Ansible

From My Mnemonic Rhyme
Revision as of 04:23, 6 October 2020 by >Homaar
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Reboot

In ansible >2.7 there is a reboot task (for roles)

To restart manually:

ansible cluster -i inventory -b -B 1 -P 0 -m shell -a "sleep 5 && reboot"

Shutdown

ansible cluster -i inventory -b -B 1 -P 0 -m shell -a "shutdown now"