From 91bac1fc025a125ba251d784303ee9d965394da9 Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Mon, 13 Apr 2020 17:43:51 +0000 Subject: [PATCH] remove templates which no longer exist --- roles/nagios_server/tasks/main.yml | 1 - .../templates/nagios/hosts/cloud-hosts.cfg.j2 | 57 ------------------- 2 files changed, 58 deletions(-) delete mode 100644 roles/nagios_server/templates/nagios/hosts/cloud-hosts.cfg.j2 diff --git a/roles/nagios_server/tasks/main.yml b/roles/nagios_server/tasks/main.yml index 9e556d11f6..199400f3c8 100644 --- a/roles/nagios_server/tasks/main.yml +++ b/roles/nagios_server/tasks/main.yml @@ -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 diff --git a/roles/nagios_server/templates/nagios/hosts/cloud-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/cloud-hosts.cfg.j2 deleted file mode 100644 index ff4f86df74..0000000000 --- a/roles/nagios_server/templates/nagios/hosts/cloud-hosts.cfg.j2 +++ /dev/null @@ -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 %}