ansible/roles/icinga-monitor/tasks/disk.yml

18 lines
484 B
YAML
Raw Normal View History

---
- name: Configure monitoring for disk
template:
src: disk.j2
dest: /etc/icinga2/conf.d/hosts/{{ inventory_hostname }}.disk
owner: "{{ icinga_user }}"
group: "{{ icinga_group }}"
delegate_to: "{{ icinga_server }}"
- name: Regenerate hosts.conf
assemble:
src: /etc/icinga2/conf.d/hosts
dest: /etc/icinga2/zones.d/master/hosts.conf
# validate: /usr/sbin/icinga2 daemon -c %s --validate
notify: Restart icinga2
delegate_to: "{{ icinga_server }}"