move the ping test to its own variable
This commit is contained in:
parent
8cf6069e6d
commit
f963dfa4d5
13 changed files with 17 additions and 11 deletions
|
@ -372,6 +372,8 @@ nagios_Check_Services:
|
|||
ping: true
|
||||
raid: false
|
||||
|
||||
nagios_Can_Connect: true
|
||||
|
||||
# Set variable if we want to use our global iptables defaults
|
||||
# Some things need to set their own.
|
||||
baseiptables: True
|
||||
|
|
|
@ -25,6 +25,8 @@ datacenter: rdu
|
|||
postfix_group: vpn
|
||||
vpn: true
|
||||
|
||||
nagios_Can_Connect: false
|
||||
|
||||
nagios_Check_Services:
|
||||
mail: false
|
||||
nrpe: false
|
||||
|
|
|
@ -26,6 +26,8 @@ nrpe_procs_crit: 1400
|
|||
|
||||
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q root@bastion13.fedoraproject.org"'
|
||||
|
||||
nagios_Can_Connect: false
|
||||
|
||||
nagios_Check_Services:
|
||||
nrpe: false
|
||||
mail: false
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
define hostgroup{
|
||||
hostgroup_name {{ key }}
|
||||
alias {{ key }}
|
||||
members {% for host in groups[key]|sort %}{{host}}, {% endfor %}
|
||||
members {% for host in groups[key]|sort %}hostvars[host].nagios_Can_Connect == true {{host}}, {% endfor %}
|
||||
|
||||
}
|
||||
{% endif %}
|
||||
|
@ -25,7 +25,7 @@ define hostgroup{
|
|||
define hostgroup{
|
||||
hostgroup_name mincheckgrp
|
||||
alias mincheckgrp
|
||||
members {% for host in groups['all']|sort %}{% if hostvars[host].nagios_Check_Services['nrpe'] != true and hostvars[host].nagios_Check_Services['ping'] == true %}{{host}}, {% endif %}{% endfor %}
|
||||
members {% for host in groups['all']|sort %}{% if hostvars[host].nagios_Check_Services['nrpe'] != true and hostvars[host].nagios_Can_Connect == true %}{{host}}, {% endif %}{% endfor %}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% for host in groups['all']|sort %}
|
||||
{% if hostvars[host].datacenter == 'bodhost' and hostvars[host].nagios_Check_Services['ping'] == true %}
|
||||
{% if hostvars[host].datacenter == 'bodhost' and hostvars[host].nagios_Can_Connect == true %}
|
||||
define host {
|
||||
{% if vars['nagios_location'] == 'internal' %}
|
||||
use defaulttemplate
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% for host in groups['all']|sort %}
|
||||
{% if hostvars[host].datacenter == 'dedicatedsolutions' and hostvars[host].nagios_Check_Services['ping'] == true %}
|
||||
{% if hostvars[host].datacenter == 'dedicatedsolutions' and hostvars[host].nagios_Can_Connect == true %}
|
||||
define host {
|
||||
{% if vars['nagios_location'] == 'internal' %}
|
||||
use defaulttemplate
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% for host in groups['all']|sort %}
|
||||
{% if hostvars[host].datacenter == 'host1plus' and hostvars[host].nagios_Check_Services['ping'] == true %}
|
||||
{% if hostvars[host].datacenter == 'host1plus' and hostvars[host].nagios_Can_Connect == true %}
|
||||
define host {
|
||||
{% if vars['nagios_location'] == 'internal' %}
|
||||
use defaulttemplate
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% for host in groups['all']|sort %}
|
||||
{% if hostvars[host].datacenter == 'ibiblio' and hostvars[host].nagios_Check_Services['ping'] == true %}
|
||||
{% if hostvars[host].datacenter == 'ibiblio' and hostvars[host].nagios_Can_Connect == true %}
|
||||
define host {
|
||||
{% if vars['nagios_location'] == 'internal' %}
|
||||
use defaulttemplate
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% for host in groups['all']|sort %}
|
||||
{% if hostvars[host].datacenter == 'osuosl' and hostvars[host].nagios_Check_Services['ping'] == true %}
|
||||
{% if hostvars[host].datacenter == 'osuosl' and hostvars[host].nagios_Can_Connect == true %}
|
||||
define host {
|
||||
{% if vars['nagios_location'] == 'internal' %}
|
||||
use defaulttemplate
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% for host in groups['all']|sort %}
|
||||
{% if hostvars[host].datacenter == 'phx2' and hostvars[host].nagios_Check_Services['ping'] == true %}
|
||||
{% if hostvars[host].datacenter == 'phx2' and hostvars[host].nagios_Can_Connect == true %}
|
||||
define host {
|
||||
{% if hostvars[host].nagios_Check_Services['nrpe'] == true %}
|
||||
use defaulttemplate
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% for host in groups['all']|sort %}
|
||||
{% if hostvars[host].datacenter == 'rdu-cc' and hostvars[host].nagios_Check_Services['ping'] == true %}
|
||||
{% if hostvars[host].datacenter == 'rdu-cc' and hostvars[host].nagios_Can_Connect == true %}
|
||||
define host {
|
||||
{% if vars['nagios_location'] == 'internal' %}
|
||||
use defaulttemplate
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% for host in groups['all']|sort %}
|
||||
{% if hostvars[host].datacenter == 'rdu' and hostvars[host].nagios_Check_Services['ping'] == true %}
|
||||
{% if hostvars[host].datacenter == 'rdu' and hostvars[host].nagios_Can_Connect == true %}
|
||||
define host {
|
||||
{% if vars['nagios_location'] == 'internal' %}
|
||||
use defaulttemplate
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% for host in groups['all']|sort %}
|
||||
{% if hostvars[host].datacenter == 'staging' and hostvars[host].nagios_Check_Services['ping'] == true %}
|
||||
{% if hostvars[host].datacenter == 'staging' and hostvars[host].nagios_Can_Connect == true %}
|
||||
define host {
|
||||
{% if hostvars[host].nagios_Check_Services['nrpe'] == true %}
|
||||
use defaulttemplate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue