From 3cc501abef03bfa6e566af8c69b27d4c84c54a1f Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Mon, 19 Dec 2022 10:19:08 -0600 Subject: [PATCH] collect: Restart after changing SELinux permissive *collectd* needs to be restarted after changing its SELinux domain to/from permissive, as many operations that may fail only happen at startup. --- collectd.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/collectd.yml b/collectd.yml index a94725a..5468d18 100644 --- a/collectd.yml +++ b/collectd.yml @@ -31,6 +31,8 @@ domain: collectd_t permissive: '{{ collectd_selinux_permissive|d(false) }}' when: ansible_selinux.status == 'enabled' + notify: + - restart collectd tags: - selinux - name: ensure collectd is running @@ -39,3 +41,8 @@ state: started tags: - service + handlers: + - name: restart collectd + service: + name: collectd + state: restarted