Update handlers
This commit is contained in:
parent
6efa88ec08
commit
b5c0291a39
@ -3,4 +3,25 @@
|
||||
- name: 'ensure_os_upgrade.package_facts'
|
||||
ansible.builtin.package_facts:
|
||||
- name: 'ensure_os_upgrade.service_facts'
|
||||
ansible.builtin.service_facts:
|
||||
ansible.builtin.service_facts:
|
||||
- name: 'ensure_os_upgrade.service_reload'
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
- ansible_service_mgr == 'systemd'
|
||||
- ensure_os_upgrade is defined
|
||||
ansible.builtin.systemd:
|
||||
daemon_reload: 'yes'
|
||||
- name: 'ensure_os_upgrade.services'
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
- ensure_os_upgrade is defined
|
||||
- ensure_os_upgrade.service_list is defined
|
||||
- ensure_os_upgrade.service_list is iterable
|
||||
- item.state == 'started'
|
||||
ansible.builtin.service:
|
||||
enabled: '{{ item.enabled }}'
|
||||
name: '{{ item.name }}'
|
||||
state: 'restarted'
|
||||
loop: '{{ ensure_os_upgrade.service_list }}'
|
||||
loop_control:
|
||||
label: '{{ item.name }} will be restarted'
|
||||
|
Loading…
x
Reference in New Issue
Block a user