From 0a2be1e58784a5556d65620e4344c75d5070e3e9 Mon Sep 17 00:00:00 2001 From: mafyuh Date: Thu, 1 Aug 2024 23:02:31 -0400 Subject: [PATCH] Add ansible/playbooks/main-reboot-required.yml --- ansible/playbooks/main-reboot-required.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ansible/playbooks/main-reboot-required.yml diff --git a/ansible/playbooks/main-reboot-required.yml b/ansible/playbooks/main-reboot-required.yml new file mode 100644 index 0000000..3f05d7e --- /dev/null +++ b/ansible/playbooks/main-reboot-required.yml @@ -0,0 +1,13 @@ +--- +- name: check if system reboot is required + hosts: "*" + become: yes + tasks: + - name: check if system reboot is required + become: true + stat: + path: /var/run/reboot-required + register: reboot_required + - debug: + msg: "Reboot is required" + when: reboot_required.stat.exists \ No newline at end of file