mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2024-11-25 17:55:06 +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
|