Skip to content

Commit eff5a85

Browse files
committed
add debug message to inform user about reboot action
1 parent 3e99183 commit eff5a85

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tasks/main.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,17 @@
3535
register: __el_patching_need_restart
3636
failed_when: __el_patching_need_restart.rc > 1
3737

38-
- name: Reboot
38+
- name: Inform user if reboot is required
39+
ansible.builtin.debug:
40+
msg: "Reboot is required to apply patches."
41+
when: __el_patching_need_restart.rc == 1
42+
43+
- name: Inform user that reboot is not required
44+
ansible.builtin.debug:
45+
msg: "Reboot is not required to apply patches."
46+
when: __el_patching_need_restart.rc == 0
47+
48+
- name: Reboot host
3949
ansible.builtin.reboot:
4050
reboot_timeout: "{{ el_patching_reboot_timeout }}"
4151
check_mode: "{{ el_patching_check_mode }}"

0 commit comments

Comments
 (0)