container, service: Support reloading containers on template file change

This commit is contained in:
uumas
2026-06-08 19:11:16 +03:00
parent 3e84073f39
commit e28a4097a0
10 changed files with 85 additions and 1 deletions

View File

@@ -4,3 +4,9 @@
systemd_restart_units: "{{ systemd_restart_units + [container_name ~ '.service'] }}" # noqa: var-naming[no-role-prefix]
changed_when: true
notify: Apply systemd unit restarts
- name: Reload container service {{ container_name }}
ansible.builtin.systemd_service:
name: "{{ container_name }}.service"
state: reloaded
when: "container_name ~ '.service' not in systemd_restart_units"