From e4a0e0be7c1d4a7a527f6ddad16fb000477c4b5f Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sun, 3 Nov 2024 15:38:30 -0500 Subject: [PATCH] Add needrestart override for PVC daemons --- roles/base/tasks/main.yml | 8 ++++++++ roles/base/templates/etc/needrestart/conf.d/pvc.conf.j2 | 4 ++++ 2 files changed, 12 insertions(+) create mode 100644 roles/base/templates/etc/needrestart/conf.d/pvc.conf.j2 diff --git a/roles/base/tasks/main.yml b/roles/base/tasks/main.yml index 85f1c60..039dc1e 100644 --- a/roles/base/tasks/main.yml +++ b/roles/base/tasks/main.yml @@ -412,6 +412,14 @@ mode: 0440 tags: base-system +# needrestart +- name: write the needrestart pvc blacklist file + template: + src: "etc/needrestart/conf.d/pvc.conf.j2" + dest: "/etc/needrestart/conf.d/pvc.conf" + mode: 0444 + tags: base-system + # dns - name: write the hosts config template: diff --git a/roles/base/templates/etc/needrestart/conf.d/pvc.conf.j2 b/roles/base/templates/etc/needrestart/conf.d/pvc.conf.j2 new file mode 100644 index 0000000..ef60901 --- /dev/null +++ b/roles/base/templates/etc/needrestart/conf.d/pvc.conf.j2 @@ -0,0 +1,4 @@ +# needrestart - Blacklist PVC binaries +# {{ ansible_managed }} + +push @{$nrconf{blacklist}}, qr(^/usr/share/pvc/);