Skip to content

Instantly share code, notes, and snippets.

@huhushow
Last active January 6, 2016 03:25
Show Gist options
  • Save huhushow/2242fd3cf25cd82e8a9a to your computer and use it in GitHub Desktop.
Save huhushow/2242fd3cf25cd82e8a9a to your computer and use it in GitHub Desktop.
- name: Task1 restart machine
shell: sleep 2 && shutdown -r now "Ansible updates triggered"
async: 1
poll: 0
- name: Task2 waiting for server to come back
local_action: wait_for host={{ ansible_ssh_host }} port={{ ansible_ssh_port }} delay=5 timeout=300 state=started
- name: Task3 ping
action: ping
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment