add become to hanlder
This commit is contained in:
parent
44263bce25
commit
b16a0ce3e3
@ -1,21 +1,23 @@
|
||||
---
|
||||
- name: Restart network
|
||||
shell: sleep 2 && systemctl restart network
|
||||
async: 1
|
||||
poll: 0
|
||||
ignore_errors: true
|
||||
when: not require_reboot
|
||||
listen:
|
||||
- "network_restart"
|
||||
- block:
|
||||
- name: Restart network
|
||||
shell: sleep 2 && systemctl restart network
|
||||
async: 1
|
||||
poll: 0
|
||||
ignore_errors: true
|
||||
when: not require_reboot
|
||||
listen:
|
||||
- "network_restart"
|
||||
|
||||
- name: Reboot server
|
||||
shell: sleep 2 && shutdown -r now "Reboot triggered by Ansible"
|
||||
async: 1
|
||||
poll: 0
|
||||
ignore_errors: true
|
||||
when: require_reboot
|
||||
listen:
|
||||
- "host_reboot"
|
||||
- name: Reboot server
|
||||
shell: sleep 2 && shutdown -r now "Reboot triggered by Ansible"
|
||||
async: 1
|
||||
poll: 0
|
||||
ignore_errors: true
|
||||
when: require_reboot
|
||||
listen:
|
||||
- "host_reboot"
|
||||
become: True
|
||||
|
||||
- name: Waiting for host startup
|
||||
wait_for_connection:
|
||||
|
Loading…
Reference in New Issue
Block a user