Give debug message on reboot required
This commit is contained in:
@@ -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:
|
||||||
@@ -20,4 +20,9 @@
|
|||||||
app_token: '{{ app_token }}'
|
app_token: '{{ app_token }}'
|
||||||
user_key: '{{ user_key }}'
|
user_key: '{{ user_key }}'
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
when: reboot_required.stat.exists
|
||||||
|
|
||||||
|
- name: Give reboot notification
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "Reboot is required on {{ inventory_hostname }}"
|
||||||
when: reboot_required.stat.exists
|
when: reboot_required.stat.exists
|
||||||
Reference in New Issue
Block a user