remove templates which no longer exist

This commit is contained in:
Stephen Smoogen 2020-04-13 17:43:51 +00:00 committed by Pierre-Yves Chibon
parent 4dc9b97f91
commit 91bac1fc02
2 changed files with 0 additions and 58 deletions

View file

@ -350,7 +350,6 @@
- name: Build out nagios host templates (production)
template: src=nagios/hosts/{{item}}.j2 dest=/etc/nagios/hosts/{{item}} mode=0644 owner=root group=root
with_items:
- cloud-hosts.cfg
- dedicatedsolutions-hosts.cfg
- host1plus-hosts.cfg
- gateway-hosts.cfg

View file

@ -1,57 +0,0 @@
{% for host in groups['cloud_phx2']|sort %}
define host {
{% if hostvars[host].nagios_Check_Services['nrpe'] and vars['nagios_location'] == 'internal' %}
use defaulttemplate
{% else %}
use mincheck
{% endif %}
host_name {{ host }}
{% if hostvars[host].ansible_hostname is defined %}
alias {{ hostvars[host].ansible_hostname }}
{% else %}
alias {{ host }}
{% endif %}
{% if hostvars[host].eth0_ip is defined %}
address {{ hostvars[host].eth0_ip }}
{% elif hostvars[host].ansible_default_ipv4 is defined %}
{% if hostvars[host].ansible_default_ipv4.address is defined %}
address {{ hostvars[host].ansible_default_ipv4.address }}
{% endif %}
{% else %}
address {{ host }}
{% endif %}
{% if hostvars[host].datacenter is defined %}
parents cloud-gw
{% endif %}
}
{% endfor %}
{% for host in groups['cloud_phx2_guests']|sort %}
define host {
{% if hostvars[host].nagios_Check_Services['nrpe'] and vars['nagios_location'] == 'internal' %}
use defaulttemplate
{% else %}
use mincheck
{% endif %}
host_name {{ host }}
{% if hostvars[host].ansible_hostname is defined %}
alias {{ hostvars[host].ansible_hostname }}
{% else %}
alias {{ host }}
{% endif %}
{% if hostvars[host].eth0_ip is defined %}
address {{ hostvars[host].eth0_ip }}
{% elif hostvars[host].ansible_default_ipv4 is defined %}
{% if hostvars[host].ansible_default_ipv4.address is defined %}
address {{ hostvars[host].ansible_default_ipv4.address }}
{% endif %}
{% else %}
address {{ host }}
{% endif %}
{% if hostvars[host]['vmhost'] is defined %}
parents {{ hostvars[host]['vmhost'] }}
{% elif hostvars[host].datacenter is defined %}
parents cloud-gw
{% endif %}
}
{% endfor %}