monit/tasks/main.yaml
2022-01-28 12:27:02 +03:00

29 lines
601 B
YAML

---
- name: Install EPEL repository
dnf:
name: epel-release
state: latest
- name: Ensure monit {{ monit_version }} installed
dnf:
name: monit-{{ monit_version }}
state: present
register: monit_setup
- name: Propagate configs
copy:
content: "{{ item.config }}"
dest: "/etc/monit.d/{{ item.conf_name }}"
notify: Reload monit
with_items:
- "{{ monit_configs }}"
when:
- (monit_configs is defined or monit_configs | length != 0)
- name: Ensure monit enabled and started
systemd:
name: monit
state: started
enabled: yes
daemon_reload: yes