Skip to content

Instantly share code, notes, and snippets.

@grisu48
Created July 16, 2019 11:04
Show Gist options
  • Select an option

  • Save grisu48/fab40bf6bf518e9c597b66bd7747d081 to your computer and use it in GitHub Desktop.

Select an option

Save grisu48/fab40bf6bf518e9c597b66bd7747d081 to your computer and use it in GitHub Desktop.
Ansible playbook to shutdown nodes
---
- 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
@sid4026
Copy link
Copy Markdown

sid4026 commented May 21, 2021

thanks for sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment