From 62766cf1fd721d278e95821e05e6b41f7888eed5 Mon Sep 17 00:00:00 2001 From: boom2 Date: Tue, 21 Nov 2023 14:11:56 -0500 Subject: initial commit --- ansible-practice/11-playbook-reboot.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 ansible-practice/11-playbook-reboot.yml (limited to 'ansible-practice/11-playbook-reboot.yml') 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 -- cgit v1.2.3-54-g00ecf