Modify the nagios role to be more idempotent

This commit is contained in:
Salt 2022-04-29 19:41:46 -05:00
parent ddb63cee5c
commit d78e0ce996

View File

@ -24,7 +24,6 @@
- "{{ nagios_data_dir }}/plugins:/opt/Custom-Nagios-Plugins"
- "{{ nagios_data_dir }}/nagiosgraph/var:/opt/nagiosgraph/var"
- "{{ nagios_data_dir }}/nagiosgraph/etc:/opt/nagiosgraph/etc"
- /dev/null:/opt/nagios/bin/nsca
- /dev/null:/opt/nagios/bin/send_nsca
tags: [ docker, nagios ]
- name: template out scripts for nagios
@ -33,7 +32,7 @@
- notify-by-matrix
tags: [ nagios, template, plugins ]
- name: template out config for nagios
template: src=nagios-ansible-inventory.cfg.j2 dest="{{ nagios_data_dir }}/etc/objects/ansible.cfg" owner=root group=root mode=0644
template: src=nagios-ansible-inventory.cfg.j2 dest="{{ nagios_data_dir }}/etc/objects/ansible.cfg" owner=101 group=100 mode=0644
tags: [ nagios, template ]
notify: restart nagios
- name: assure config file is loaded