Created
June 17, 2014 22:34
-
-
Save AntelopeSalad/87f5b375bcb2887e095e 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: Reboot a host and wait for it to return | |
hosts: somehost | |
tasks: | |
- shell: shutdown -r now | |
- pause: seconds=30 | |
- local_action: shell ansible -m ping {{ inventory_hostname }} | |
register: result | |
until: result.rc == 0 | |
retries: 30 | |
delay: 10 | |
- shell: uptime |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment