Created
November 30, 2017 10:38
-
-
Save jrisch/28322a40d5b370643873c36881e5466b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Insert Xentools CD in CDROM drive | |
command: xe vm-cd-insert cd-name=xs-tools.iso vm={{ vmuuid.stdout }} | |
when: ansible_distribution_major_version|int <= 6 | |
- name: Insert Xentools CD in CDROM drive | |
command: xe vm-cd-insert cd-name=guest-tools.iso vm={{ vmuuid.stdout }} | |
when: ansible_distribution_major_version|int >= 7 | |
- name: Get the last boot time for the VM | |
command: xe vm-param-get param-name=start-time uuid={{ vmuuid.stdout}} | |
register: boottime | |
- name: Watch for the last reboot | |
shell: export starttime={{ boottime.stdout }}; while [[ ${starttime} == {{ boottime.stdout }} ]]; do sleep 15; starttime=`xe vm-param-get param-name=start-time uuid={{ vmuuid.stdout }}`; done | |
async: 1800 | |
poll: 15 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment