mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2024-12-11 09:43:08 +01:00
38e065c218
The use of `/var/run` was deprecated by FHS 3.0 nine years ago, so it's time to finally get rid of it where possible. The canonical directory for run-time variable data is `/run` nowadaya,s with `/var/run` just being a symbolic link for backward compatibilty and to ease transition.
17 lines
412 B
YAML
17 lines
412 B
YAML
---
|
|
- name: Check if system reboot is required
|
|
hosts: "{{ my_hosts | d([]) }}"
|
|
become: true
|
|
|
|
tasks:
|
|
- name: Check if system reboot is required
|
|
become: true
|
|
ansible.builtin.stat:
|
|
path: /run/reboot-required
|
|
register: reboot_required
|
|
|
|
- name: Report if reboot is required
|
|
ansible.builtin.debug:
|
|
msg: "Reboot is required"
|
|
when: reboot_required.stat.exists
|