Handler improvement

Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
This commit is contained in:
Jason Rothstein 2025-05-25 20:08:20 -05:00
parent bc3ffbcc22
commit 0c15c19e1a
Signed by: jmrothst
GPG Key ID: 741BF3C536829D46
2 changed files with 8 additions and 1 deletions

View File

@ -11,7 +11,7 @@
- ensure_log_rotation is defined
ansible.builtin.systemd:
daemon_reload: 'yes'
- name: 'ensure_log_rotation.services'
- name: 'ensure_log_rotation.service_restart'
when:
- ansible_system == 'Linux'
- ensure_log_rotation is defined
@ -25,3 +25,5 @@
loop: '{{ ensure_log_rotation.service_list }}'
loop_control:
label: '{{ item.name }} will be restarted'
...

View File

@ -68,6 +68,11 @@
loop: '{{ ensure_log_rotation.template_list }}'
loop_control:
label: '{{ item.dest }}'
notify:
- 'ensure_log_rotation.package_facts'
- 'ensure_log_rotation.service_facts'
- 'ensure_log_rotation.service_reload'
- 'ensure_log_rotation.service_restart'
- name: 'ensure services'
when:
- ansible_system == 'Linux'