Add SELinux module install to role

This commit is contained in:
2021-10-19 15:55:21 +13:00
parent 2ae40a30a9
commit 99af4c4a86
2 changed files with 20 additions and 0 deletions

Binary file not shown.

View File

@@ -6,6 +6,26 @@
state: present
notify: restart xinetd
- name: Fix SeLinux Auto-Updates
block:
- name: list installed selinux modules
command: /usr/sbin/semodule -l
register: installed_mods
- name: check_mk_mod_installed
set_fact:
cmk_mod_installed: True
when: '"check-mk-agent-self-update" in installed_mods.stdout'
- name: copy file
copy:
src: files/checkmk-agent-autoupgrade.pp
dest: /tmp/checkmk-agent-autoupgrade.pp
when: cmk_mod_installed is not defined
- name: install the module
command: /usr/sbin/semodule -i /tmp/checkmk-agent-autoupgrade.pp
when: cmk_mod_installed is not defined
when: ansible_selinux
tags: selinux-pre
- name: Gather facts of packages
package_facts:
manager: "auto"