summaryrefslogtreecommitdiff
path: root/ansible-practice/11-playbook-reboot.yml
diff options
context:
space:
mode:
authorboom2 <blizzack@blizzack.com>2023-12-14 17:24:25 -0500
committerboom2 <blizzack@blizzack.com>2023-12-14 17:24:25 -0500
commitf30709d7dbe88d82c4df66c476db36cb5c0ce903 (patch)
treeca861d7aa3e30c73a4fefeb9186f221cf15a8ff5 /ansible-practice/11-playbook-reboot.yml
parentd8a7729358a2fd3b911022e45d0197fda3e5da94 (diff)
- add "new_host" role for system setup
- no longer use "all" to mention all hosts in playbooks - update of hosts file to now use localhost as "test"
Diffstat (limited to 'ansible-practice/11-playbook-reboot.yml')
-rw-r--r--ansible-practice/11-playbook-reboot.yml8
1 files changed, 7 insertions, 1 deletions
diff --git a/ansible-practice/11-playbook-reboot.yml b/ansible-practice/11-playbook-reboot.yml
index 91dd20a..32b096b 100644
--- a/ansible-practice/11-playbook-reboot.yml
+++ b/ansible-practice/11-playbook-reboot.yml
@@ -2,6 +2,8 @@
# 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
+# https://docs.ansible.com/ansible/latest/plugins/become.html
+# https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_privilege_escalation.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
@@ -18,10 +20,14 @@
#
# ansible-playbook 11-playbook-reboot.yml --become -K
#
+# -or-
+#
+# ansible-playbook 11-playbook-reboot.yml -b -K
+#
---
- name: "11 - Playing with Ansible - reboot a host"
- hosts: all
+ hosts: dev
tasks:
- name: reboot a host
ansible.builtin.reboot: