From f30709d7dbe88d82c4df66c476db36cb5c0ce903 Mon Sep 17 00:00:00 2001 From: boom2 Date: Thu, 14 Dec 2023 17:24:25 -0500 Subject: - 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" --- ansible-practice/11-playbook-reboot.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ansible-practice/11-playbook-reboot.yml') 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: -- cgit v1.2.3-54-g00ecf