From cae8cfc4cb15366aad74068ffe74aebbe689b805 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Thu, 27 May 2021 01:38:43 -0400 Subject: [PATCH] Add norestart policy for apt updates --- oneshot/update-pvc-cluster.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/oneshot/update-pvc-cluster.yml b/oneshot/update-pvc-cluster.yml index a2e34b8..26731c9 100644 --- a/oneshot/update-pvc-cluster.yml +++ b/oneshot/update-pvc-cluster.yml @@ -9,6 +9,14 @@ - name: set PVC maintenance mode command: pvc maintenance on + - name: temporarily set norestart policy + copy: + dest: "/usr/sbin/policy-rc.d" + mode: "0755" + content: | + #!/bin/sh + exit 101 + - name: aptitude full upgrade and cleanup apt: update_cache: yes @@ -27,6 +35,12 @@ dest: /var/cache/apt/archives state: absent + - name: remove temporarily set norestart policy + file: + dest: "/usr/sbin/policy-rc.d" + state: "absent" + force: "yes" + - name: check library freshness command: /usr/lib/check_mk_agent/plugins/freshness register: freshness