You've already forked role-check-mk-agent
Add SELinux module install to role
This commit is contained in:
BIN
files/checkmk-agent-autoupgrade.pp
Normal file
BIN
files/checkmk-agent-autoupgrade.pp
Normal file
Binary file not shown.
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user