summaryrefslogtreecommitdiff
path: root/root_reboot.yml
blob: b4122dc9f2b67021a79ce79ad15324ae37c85a6f (plain)
1
2
3
4
5
6
7
8
9
10
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 ***'"