collectd: Only configure SELinux when used

The `selinux_permissive` module fails on hosts that do not have SELinux
activated.  We must skip running this task on those machines to avoid
fatal errors.
btop
Dustin 2022-08-14 19:39:02 -05:00
parent 82f2a7518e
commit cfffd1d782
1 changed files with 1 additions and 0 deletions

View File

@ -30,6 +30,7 @@
selinux_permissive: selinux_permissive:
domain: collectd_t domain: collectd_t
permissive: '{{ collectd_selinux_permissive|d(false) }}' permissive: '{{ collectd_selinux_permissive|d(false) }}'
when: ansible_selinux.status == 'enabled'
tags: tags:
- selinux - selinux
- name: ensure collectd is running - name: ensure collectd is running