lets try not defining some
This commit is contained in:
parent
d113cd744d
commit
d4042134d4
3 changed files with 10 additions and 3 deletions
|
@ -262,6 +262,7 @@ nagios_Check_Services:
|
||||||
dhcpd: false
|
dhcpd: false
|
||||||
httpd: false
|
httpd: false
|
||||||
swap: true
|
swap: true
|
||||||
|
ping: true
|
||||||
|
|
||||||
# Set variable if we want to use our global iptables defaults
|
# Set variable if we want to use our global iptables defaults
|
||||||
# Some things need to set their own.
|
# Some things need to set their own.
|
||||||
|
|
|
@ -25,6 +25,12 @@ datacenter: rdu
|
||||||
postfix_group: vpn
|
postfix_group: vpn
|
||||||
vpn: true
|
vpn: true
|
||||||
|
|
||||||
|
nagios_Check_Services:
|
||||||
|
nrpe: false
|
||||||
|
sshd: false
|
||||||
|
swap: false
|
||||||
|
ping: false
|
||||||
|
|
||||||
nrpe_procs_warn: 1200
|
nrpe_procs_warn: 1200
|
||||||
nrpe_procs_crit: 1400
|
nrpe_procs_crit: 1400
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
{% for host in groups['all'] %}
|
{% for host in groups['all'] %}
|
||||||
{% if hostvars[host].datacenter == 'rdu' %}
|
{% if hostvars[host].datacenter == 'rdu' and hostvars[host].nagios_Check_Services['ping'] == true %}
|
||||||
define host {
|
define host {
|
||||||
{% if vars['nagios_location'] == 'internal' %}
|
{% if vars['nagios_location'] == 'internal' %}
|
||||||
use defaulttemplate
|
use defaulttemplate
|
||||||
{% else %}
|
{% else %}
|
||||||
use mincheck
|
use mincheck
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
host_name {{ host }}
|
||||||
host_name {{ host }}
|
|
||||||
{% if hostvars[host].ansible_hostname is defined %}
|
{% if hostvars[host].ansible_hostname is defined %}
|
||||||
alias {{ hostvars[host].ansible_hostname }}
|
alias {{ hostvars[host].ansible_hostname }}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -24,5 +23,6 @@ define host {
|
||||||
parents rdu-gw
|
parents rdu-gw
|
||||||
{% endif %}
|
{% endif %}
|
||||||
}
|
}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue