diff --git a/handlers/main.yml b/handlers/main.yml index 968bdd9..22fff92 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -16,8 +16,14 @@ state: enabled permanent: yes immediate: yes + ignore_errors: true - name: remove agent file: path: /tmp/check-mk-agent.rpm + state: absent + +- name: remove selinux policy file + file: + path: /tmp/checkmk-agent-autoupgrade.pp state: absent \ No newline at end of file diff --git a/tasks/RedHat.yml b/tasks/RedHat.yml index 80817c4..61592b5 100644 --- a/tasks/RedHat.yml +++ b/tasks/RedHat.yml @@ -24,6 +24,7 @@ - name: install the module command: /usr/sbin/semodule -i /tmp/checkmk-agent-autoupgrade.pp when: cmk_mod_installed is not defined + notify: remove selinux policy file when: ansible_selinux tags: selinux-pre