From 1a7969b707423765d6f9ddd2c58d535935938032 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Tue, 17 May 2022 16:25:52 -0400 Subject: [PATCH] Update freshness checks --- oneshot/update-pvc-cluster.yml | 12 +++--------- roles/base/tasks/main.yml | 1 + 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/oneshot/update-pvc-cluster.yml b/oneshot/update-pvc-cluster.yml index 9cb50b0..ab253bc 100644 --- a/oneshot/update-pvc-cluster.yml +++ b/oneshot/update-pvc-cluster.yml @@ -48,18 +48,12 @@ state: "absent" force: "yes" - - name: check library freshness - command: /usr/lib/check_mk_agent/plugins/freshness + - name: check freshness + command: /usr/sbin/needrestart -p register: freshness changed_when: freshness.rc == 1 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 block: - name: secondary node @@ -204,7 +198,7 @@ - name: reset any systemd failures command: systemctl reset-failed - when: freshness.changed or kernelversion.changed + when: freshness.changed - name: wait 30 seconds for system to stabilize pause: diff --git a/roles/base/tasks/main.yml b/roles/base/tasks/main.yml index 00392ce..5ac1371 100644 --- a/roles/base/tasks/main.yml +++ b/roles/base/tasks/main.yml @@ -238,6 +238,7 @@ - sysstat - binutils - deborphan + - needrestart - wget - curl - gawk