summaryrefslogtreecommitdiff
path: root/ansible-practice/10-playbook-shutdown.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/10-playbook-shutdown.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/10-playbook-shutdown.yml')
-rw-r--r--ansible-practice/10-playbook-shutdown.yml9
1 files changed, 8 insertions, 1 deletions
diff --git a/ansible-practice/10-playbook-shutdown.yml b/ansible-practice/10-playbook-shutdown.yml
index 5b568b3..1cf92b5 100644
--- a/ansible-practice/10-playbook-shutdown.yml
+++ b/ansible-practice/10-playbook-shutdown.yml
@@ -1,5 +1,7 @@
# shutdown a host
# https://docs.ansible.com/ansible/latest/collections/community/general/shutdown_module.html
+# https://docs.ansible.com/ansible/latest/plugins/become.html
+# https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_privilege_escalation.html
#
# had to run the command like so:
#
@@ -12,10 +14,15 @@
# -or-
#
# ansible-playbook 10-playbook-shutdown.yml --become -K
+#
+# -or-
+#
+# ansible-playbook 10-playbook-shutdown.yml -b -K
+#
---
- name: "10 - Playing with Ansible - shutdown a host"
- hosts: all
+ hosts: dev
tasks:
- name: shutdown a host
community.general.shutdown: