summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--root_reboot.yml11
1 files changed, 11 insertions, 0 deletions
diff --git a/root_reboot.yml b/root_reboot.yml
new file mode 100644
index 0000000..b4122dc
--- /dev/null
+++ b/root_reboot.yml
@@ -0,0 +1,11 @@
+---
+- name: Make sure reboot message is shown
+ hosts: server
+ gather_facts: false
+ tasks:
+ - name: Add line
+ lineinfile:
+ path: ~/.profile
+ state: present
+ search_string: "[[ -f /var/run/reboot-required ]] && echo '\\n*** You need to reboot *** \\n'"
+ line: "[[ -f /var/run/reboot-required ]] && echo && echo '*** You need to reboot ***'"