diff --git a/handlers/main.yml b/handlers/main.yml index 6017a18..797fda6 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -6,14 +6,14 @@ ansible.builtin.service_facts: - name: 'ensure_os_patch.service_reload' when: - - ansible_system == 'Linux' - - ansible_service_mgr == 'systemd' + - ansible_facts["system"] == 'Linux' + - ansible_facts["service_mgr"] == 'systemd' - ensure_os_patch is defined ansible.builtin.systemd: daemon_reload: 'yes' - name: 'ensure_os_patch.service_restart' when: - - ansible_system == 'Linux' + - ansible_facts["system"] == 'Linux' - ensure_os_patch is defined - ensure_os_patch.service_list is defined - ensure_os_patch.service_list is iterable