xoxys.network/handlers/main.yml
Robert Kaussow a5d22b014b
All checks were successful
continuous-integration/drone/push Build is passing
fix linting
2022-10-11 09:48:18 +02:00

30 lines
604 B
YAML

---
- block:
- name: Restart network
shell: "{{ __network_restart_command }}"
async: 1
poll: 0
when: not require_reboot | bool
listen: __network_restart
tags:
- skip_ansible_later
- name: Reboot server
reboot:
msg: "Reboot triggered by Ansible"
async: 1
poll: 0
ignore_errors: yes
when: require_reboot | bool
listen: __host_reboot
become: True
become_user: root
- name: Waiting for host startup
wait_for_connection:
delay: 5
timeout: 300
listen:
- __network_restart
- __host_reboot