Give debug message on reboot required

This commit is contained in:
2026-02-01 12:32:10 +01:00
parent 0920465a89
commit ed15164678

View File

@@ -5,8 +5,8 @@
tasks: tasks:
- name: Update apt packages - name: Update apt packages
apt: apt:
upgrade: dist
update_cache: yes update_cache: yes
upgrade: dist
- name: Check if reboot is needed - name: Check if reboot is needed
stat: stat:
@@ -21,3 +21,8 @@
user_key: '{{ user_key }}' user_key: '{{ user_key }}'
delegate_to: localhost delegate_to: localhost
when: reboot_required.stat.exists when: reboot_required.stat.exists
- name: Give reboot notification
ansible.builtin.debug:
msg: "Reboot is required on {{ inventory_hostname }}"
when: reboot_required.stat.exists