add host_mantenance systemd_mount
image-deploy.yaml / build-push-image (push) Successful in 24s

This commit is contained in:
Márcio Fernandes committed 2026-10-11 21:22:46 +00:00
1 parent 6f3911a433
commit c187d56137
3 files changed
+48

No files matched your search

@@ -0,0 +1,27 @@
#vars:
# host_maintenance_systemd_mount_target: ""
# host_maintenance_systemd_mount_source: ""
- name: check target folders
ansible.builtin.file:
path: "{{ item.target }}"
state: directory
mode: '0755'
loop: "{{ host_maintenance_disk_mounts }}"
- name: set systemd mount
ansible.builtin.template:
src: templates/systemd_mount.j2
dest: "/etc/systemd/system/{{ item.target | regex_replace('^/', '') | regex_replace('/', '-') }}.mount"
mode: '0644'
loop: "{{ host_maintenance_disk_mounts }}"
register: systemd_mount_files
- name: reload systemd
ansible.builtin.systemd_service:
name: "{{ item.target | regex_replace('^/', '') | regex_replace('/', '-') }}.mount"
daemon_reload: "{{ systemd_mount_files.changed }}"
enabled: true
state: started
loop: "{{ host_maintenance_disk_mounts }}"
@@ -0,0 +1,14 @@
[Unit]
Description=Mount {{ item.target }} managed by mylimbo.globals collections, host_maintenance role
#After=
Conflicts={{ item.unit_conflicts }}
Before={{ item.unit_before }}
[Mount]
What={{ item.source }}
Where={{ item.target }}
Type={{ item.mount_type }}
Options={{ item.mount_options | join(',') }}
[Install]
WantedBy=multi-user.target