From bda18d71bbd4d88305709beae84e8a66e013d7ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rcio=20Fernandes?= Date: Tue, 13 Oct 2026 21:44:24 +0000 Subject: [PATCH] modified: roles/host_maintenance/templates/systemd_mount.j2 --- .../templates/systemd_mount.j2 | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/roles/host_maintenance/templates/systemd_mount.j2 b/roles/host_maintenance/templates/systemd_mount.j2 index d33e640..d2e6acd 100644 --- a/roles/host_maintenance/templates/systemd_mount.j2 +++ b/roles/host_maintenance/templates/systemd_mount.j2 @@ -1,14 +1,29 @@ +{% if item.source is not defined or item.target is not defined or item.mount_type is not defined %} + {% raise exception msg="All of source, target, and mount_type must be defined for each disk entry." %} +{% endif %} + [Unit] Description=Mount {{ item.target }} managed by mylimbo.globals collections, host_maintenance role -#After= -Conflicts={{ item.unit_conflicts }} + +# After dependencies +{% if item.unit_after is defined %} +After={{ item.unit_after }} +{% endif %} + +# Before dependencies +{% if item.unit_before is defined %} Before={{ item.unit_before }} +{% endif %} [Mount] What={{ item.source }} Where={{ item.target }} Type={{ item.mount_type }} + +# Mount options, if specified +{% if item.mount_options is defined %} Options={{ item.mount_options | join(',') }} +{% endif %} [Install] WantedBy=multi-user.target \ No newline at end of file