Last active
April 26, 2021 13:31
-
-
Save elnur/3d166a4e6867f2a1a831 to your computer and use it in GitHub Desktop.
Rebooting Servers One-by-One With Ansible http://elnur.pro/rebooting-servers-one-by-one-with-ansible/
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
- hosts: all | |
serial: 1 | |
tasks: | |
- name: Reboot | |
command: /sbin/reboot removes=/var/run/reboot-required | |
- name: Wait for the server to reboot | |
local_action: wait_for host={{ inventory_hostname }} port=22 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment