lets try not defining some

This commit is contained in:
Stephen Smoogen 2017-12-01 01:29:27 +00:00
parent d113cd744d
commit d4042134d4
3 changed files with 10 additions and 3 deletions

View file

@ -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.

View file

@ -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

View file

@ -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 %}