mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2024-12-01 12:45:00 +01:00
17 lines
416 B
YAML
17 lines
416 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: /var/run/reboot-required
|
|
register: reboot_required
|
|
|
|
- name: Report if reboot is required
|
|
ansible.builtin.debug:
|
|
msg: "Reboot is required"
|
|
when: reboot_required.stat.exists
|