Ansible: Difference between revisions

From My Mnemonic Rhyme
Jump to navigation Jump to search
>Homaar
No edit summary
 
(No difference)

Latest revision as of 04:23, 6 October 2020

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"