diff options
Diffstat (limited to 'ansible-practice/11-playbook-reboot.yml')
| -rw-r--r-- | ansible-practice/11-playbook-reboot.yml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ansible-practice/11-playbook-reboot.yml b/ansible-practice/11-playbook-reboot.yml new file mode 100644 index 0000000..3790a8e --- /dev/null +++ b/ansible-practice/11-playbook-reboot.yml @@ -0,0 +1,23 @@ +# reboot a host +# https://www.freekb.net/Article?id=3078 +# https://www.freekb.net/Article?id=2395 +# https://docs.ansible.com/ansible/latest/collections/ansible/builtin/reboot_module.html +# +# - will need to find another option for reboot cuz this was a wonky behavior from ansible +# - it asked me to enter my passphrase 5 times before actually took properly +# +# had to run the command like so: +# +# ansible-playbook 11-playboot-reboot.yml --ask-become-pass + +--- +- name: "11 - Playing with Ansible - reboot a host" + hosts: all + tasks: + - name: reboot a host + ansible.builtin.reboot: + msg: "reboot initiated by ansible" + connect_timeout: 5 + post_reboot_delay: 30 + become: yes +...
\ No newline at end of file |
