Initial commit of roles-refactor branch
This commit is contained in:
10
roles/reboot/tasks/main.yaml
Normal file
10
roles/reboot/tasks/main.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
- name: Check if kernel or microcode update requires reboot
|
||||
ansible.builtin.script: check_reboot.zsh # Your script placed in files/
|
||||
register: reboot_check
|
||||
# Prevent Ansible from failing if the script returns false (exit code 1)
|
||||
failed_when: false
|
||||
# Trigger the handler ONLY if the script returns true (exit code 0)
|
||||
changed_when: reboot_check.rc == 0
|
||||
notify: Reboot system
|
||||
|
||||
Reference in New Issue
Block a user