summaryrefslogtreecommitdiff
path: root/ansible-practice/10-playbook-shutdown.yml
diff options
context:
space:
mode:
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: