From 38d7b9c2207a08d57d5d00ef43bf880524cd8cea Mon Sep 17 00:00:00 2001 From: VR Date: Wed, 19 Oct 2022 16:34:54 +0100 Subject: [PATCH] Added shutdown function. Added FQCN to reboot playbook --- home_linux/reboot.yml | 2 +- home_linux/shutdown.yml | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 home_linux/shutdown.yml diff --git a/home_linux/reboot.yml b/home_linux/reboot.yml index e2dcf31..ee828a5 100644 --- a/home_linux/reboot.yml +++ b/home_linux/reboot.yml @@ -9,6 +9,6 @@ tasks: - name: Rebooting... - reboot: + ansible.builtin.reboot: msg: "Reboot initiated by Ansible" test_command: uptime diff --git a/home_linux/shutdown.yml b/home_linux/shutdown.yml new file mode 100644 index 0000000..01df0f5 --- /dev/null +++ b/home_linux/shutdown.yml @@ -0,0 +1,13 @@ +--- +- name: Shutdown the Raspberries + hosts: all + gather_facts: no + roles: + - common + become: yes + + tasks: + + - name: Shutting down... + community.general.shutdown: + msg: "Shutdown initiated by Ansible"