reboot als handler (#111)
reboot als handler Co-authored-by: Michael Grote <michael.grote@posteo.de> Reviewed-on: mg/ansible#111 Co-Authored-By: mg <mg@noreply.git.mgrote.net> Co-Committed-By: mg <mg@noreply.git.mgrote.net>
This commit is contained in:
parent
f408590a63
commit
58cb2946e2
2 changed files with 6 additions and 7 deletions
5
roles/mgrote.qemu_guest_agent/handlers/main.yml
Normal file
5
roles/mgrote.qemu_guest_agent/handlers/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
- name: reboot
|
||||||
|
become: true
|
||||||
|
reboot:
|
||||||
|
reboot_timeout: 120
|
|
@ -5,10 +5,4 @@
|
||||||
name: qemu-guest-agent
|
name: qemu-guest-agent
|
||||||
state: present
|
state: present
|
||||||
when: ansible_virtualization_role == 'guest'
|
when: ansible_virtualization_role == 'guest'
|
||||||
register: qemu_installed
|
notify: reboot
|
||||||
|
|
||||||
- name: reboot (dauert bis zu 2min!)
|
|
||||||
become: true
|
|
||||||
reboot:
|
|
||||||
reboot_timeout: 120
|
|
||||||
when: qemu_installed.changed == true
|
|
||||||
|
|
Loading…
Reference in a new issue