Update freshness checks

This commit is contained in:
Joshua Boniface 2023-09-01 15:42:28 -04:00
parent d47d320bb3
commit 9e20e47903
2 changed files with 4 additions and 9 deletions

View File

@ -48,18 +48,12 @@
state: "absent" state: "absent"
force: "yes" force: "yes"
- name: check library freshness - name: check freshness
command: /usr/lib/check_mk_agent/plugins/freshness command: /usr/sbin/needrestart -p
register: freshness register: freshness
changed_when: freshness.rc == 1 changed_when: freshness.rc == 1
failed_when: false failed_when: false
- name: check kernel version
command: /usr/lib/check_mk_agent/plugins/kernelversion
register: kernelversion
changed_when: kernelversion.rc == 1
failed_when: false
- name: restart system cleanly - name: restart system cleanly
block: block:
- name: secondary node - name: secondary node
@ -204,7 +198,7 @@
- name: reset any systemd failures - name: reset any systemd failures
command: systemctl reset-failed command: systemctl reset-failed
when: freshness.changed or kernelversion.changed when: freshness.changed
- name: wait 30 seconds for system to stabilize - name: wait 30 seconds for system to stabilize
pause: pause:

View File

@ -238,6 +238,7 @@
- sysstat - sysstat
- binutils - binutils
- deborphan - deborphan
- needrestart
- wget - wget
- curl - curl
- gawk - gawk