From 520600d269b2ba1ea9cb80a77850b0cf391dbbad Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 25 May 2025 20:13:45 -0500 Subject: [PATCH] Handler improvements Signed-off-by: Jason Rothstein --- handlers/main.yml | 4 +++- tasks/main.yml | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/handlers/main.yml b/handlers/main.yml index 6194320..6293062 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -11,7 +11,7 @@ - ensure_selinux is defined ansible.builtin.systemd: daemon_reload: 'yes' -- name: 'ensure_selinux.services' +- name: 'ensure_selinux.service_restart' when: - ansible_system == 'Linux' - ensure_selinux is defined @@ -25,3 +25,5 @@ loop: '{{ ensure_selinux.service_list }}' loop_control: label: '{{ item.name }} will be restarted' +... + diff --git a/tasks/main.yml b/tasks/main.yml index 66fd386..422c2ab 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -67,6 +67,8 @@ notify: - 'ensure_selinux.package_facts' - 'ensure_selinux.service_facts' + - 'ensure_selinux.service_reload' + - 'ensure_selinux.service_restart' - name: 'ensure services' when: - ansible_system == 'Linux' @@ -118,4 +120,5 @@ label: '{{ item.name }} will be {{ item.state }}' - name: 'flush handlers' meta: 'flush_handlers' +...