container, service: Support reloading containers on template file change
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user