fix cloud nagios
This commit is contained in:
parent
b15745a15e
commit
8b9c9a395b
2 changed files with 38 additions and 2 deletions
|
@ -10,7 +10,6 @@ virthost-os02.fedorainfracloud.org
|
||||||
virthost-os03.fedorainfracloud.org
|
virthost-os03.fedorainfracloud.org
|
||||||
storinator01.fedorainfracloud.org
|
storinator01.fedorainfracloud.org
|
||||||
cloudvmhost-aarch64-01.fedorainfracloud.org
|
cloudvmhost-aarch64-01.fedorainfracloud.org
|
||||||
cloud-noc01.fedorainfracloud.org
|
|
||||||
|
|
||||||
##
|
##
|
||||||
## New Community Hardware
|
## New Community Hardware
|
||||||
|
@ -18,6 +17,14 @@ cloud-noc01.fedorainfracloud.org
|
||||||
os-proxy01.fedorainfracloud.org
|
os-proxy01.fedorainfracloud.org
|
||||||
os-proxy02.fedorainfracloud.org
|
os-proxy02.fedorainfracloud.org
|
||||||
|
|
||||||
|
[cloud_phx2_guests]
|
||||||
|
cloud-noc01.fedorainfracloud.org
|
||||||
|
armv7-test01.fedorainfracloud.org
|
||||||
|
armv7-test02.fedorainfracloud.org
|
||||||
|
aarch64-test01.fedorainfracloud.org
|
||||||
|
aarch64-test02.fedorainfracloud.org
|
||||||
|
|
||||||
|
|
||||||
[cloud_aws]
|
[cloud_aws]
|
||||||
iddev.fedorainfracloud.org
|
iddev.fedorainfracloud.org
|
||||||
rawhide-test.fedorainfracloud.org
|
rawhide-test.fedorainfracloud.org
|
||||||
|
@ -57,3 +64,4 @@ ppc64le-test.fedorainfracloud.org
|
||||||
[cloud:children]
|
[cloud:children]
|
||||||
cloud_phx2
|
cloud_phx2
|
||||||
cloud_aws
|
cloud_aws
|
||||||
|
cloud_phx2_guests
|
||||||
|
|
|
@ -14,7 +14,35 @@ define host {
|
||||||
{% if hostvars[host].eth0_ip is defined %}
|
{% if hostvars[host].eth0_ip is defined %}
|
||||||
address {{ hostvars[host].eth0_ip }}
|
address {{ hostvars[host].eth0_ip }}
|
||||||
{% elif hostvars[host].ansible_default_ipv4 is defined %}
|
{% elif hostvars[host].ansible_default_ipv4 is defined %}
|
||||||
{% if hostvars[host].ansible_default_ipv4.address is defined and host not in groups['cloud_phx2'] %}
|
{% 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 }}
|
address {{ hostvars[host].ansible_default_ipv4.address }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue