This should allow for ansible to build correctly the templates for noc01/noc02.
This commit is contained in:
parent
1250b004ea
commit
e36f982263
3 changed files with 10 additions and 9 deletions
|
@ -12,9 +12,11 @@ define service {
|
|||
use criticaltemplate
|
||||
}
|
||||
|
||||
{% if vars['nagios_location'] == 'external' %}
|
||||
define service {
|
||||
host_name nagios-external.fedoraproject.org
|
||||
service_description ICMP-Ping6-check
|
||||
check_command check-host-alive6!fedorapeople.org!1500.0,20%!2500.0,80%
|
||||
use criticaltemplate
|
||||
}
|
||||
{% endif %}
|
||||
|
|
|
@ -419,7 +419,6 @@
|
|||
- rdu-hosts.cfg
|
||||
- iad2-external.cfg
|
||||
- aws-hosts.cfg
|
||||
- ibiblio-hosts-ipv6.cfg
|
||||
when: env == "production"
|
||||
tags:
|
||||
- nagios_server
|
||||
|
@ -457,6 +456,7 @@
|
|||
template: src=nagios/hosts/{{item}}.j2 dest=/etc/nagios/hosts/{{item}} mode=0644 owner=root group=root
|
||||
with_items:
|
||||
- iad2-external.cfg
|
||||
- ibiblio-hosts-ipv6.cfg
|
||||
when: env == "production" and nagios_location == "external"
|
||||
tags:
|
||||
- nagios_server
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
{% for host in groups['all']|sort %}
|
||||
{% if hostvars[host].datacenter == 'ibiblio' and hostvars[host].nagios_Can_Connect == true %}
|
||||
define host {
|
||||
{% if vars['nagios_location'] == 'iad2_internal' %}
|
||||
use defaulttemplate
|
||||
{% else %}
|
||||
use mincheck
|
||||
## This template currently only works for noc02. If noc01 gets ipv6 then
|
||||
## it will need to be revisited.
|
||||
|
||||
{% for host in groups['all']|sort %} {%
|
||||
if hostvars[host].datacenter == 'ibiblio' and
|
||||
hostvars[host].nagios_Can_Connect == true %} define host { use mincheck
|
||||
{% endif %}
|
||||
|
||||
host_name {{ host }}
|
||||
host_name {{ host }}-ipv6
|
||||
{% if hostvars[host].ansible_hostname is defined %}
|
||||
alias {{ hostvars[host].ansible_hostname }}
|
||||
{% else %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue