Created
July 16, 2019 11:04
-
-
Save grisu48/fab40bf6bf518e9c597b66bd7747d081 to your computer and use it in GitHub Desktop.
Ansible playbook to shutdown nodes
This file contains hidden or 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
--- | |
- hosts: ap-nodes | |
gather_facts: no | |
tasks: | |
- name: shutdown | |
command: /sbin/shutdown -h now | |
sudo: yes | |
- name: wait go down | |
local_action: wait_for host={{ ansible_ssh_host }} port=22 state=stopped |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks for sharing