Files
ansible-role-checkmk-agent/handlers/main.yml
Aaron Guise 95db05f277
Some checks failed
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/test/2 unknown status
ci/woodpecker/push/test/1 unknown status
ci/woodpecker/push/z.ntfy unknown status
Don't restart xinetd as not installed in RHEL9
2024-01-30 13:23:31 +13:00

35 lines
817 B
YAML

---
# handlers file for ansible-role-cmk-agent
- name: restart xinetd
service:
name: xinetd
state: restarted
enabled: true
when: 'ansible_os_family != "RedHat" and ansible_os_distribution_major_version != "9"'
- name: cmk fresh install
set_fact:
cmk_fresh_install: true
- name: ensure firewall open (rhel)
firewalld:
port: 6556/tcp
state: enabled
permanent: true
immediate: true
ignore_errors: true
when: ansible_os_family == "RedHat"
- name: ensure firewall open (debian)
ufw:
rule: allow
port: 6556
proto: tcp
ignore_errors: true
when: ansible_os_family == "Debian"
- 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