summaryrefslogtreecommitdiff
path: root/ansible-practice/11-playbook-reboot.yml
diff options
context:
space:
mode:
authorboom2 <blizzack@blizzack.com>2023-11-21 14:11:56 -0500
committerboom2 <blizzack@blizzack.com>2023-11-21 14:11:56 -0500
commit62766cf1fd721d278e95821e05e6b41f7888eed5 (patch)
tree35c0866b9dbc09cdc695435a3aa6aa1424cac1a4 /ansible-practice/11-playbook-reboot.yml
initial commit
Diffstat (limited to 'ansible-practice/11-playbook-reboot.yml')
-rw-r--r--ansible-practice/11-playbook-reboot.yml23
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