more sorting
This commit is contained in:
parent
7880a0bf23
commit
b3be8b3111
7 changed files with 12 additions and 12 deletions
|
@ -1,20 +1,20 @@
|
|||
define hostgroup {
|
||||
hostgroup_name dns
|
||||
alias DNS Servers
|
||||
members {% for host in groups["dns-external"] %} {{ hostvars[host]["inventory_hostname_short"] }}.fedoraproject.org {% if not loop.last %}, {% endif %} {% endfor %}
|
||||
members {% for host in groups["dns-external"]|sort %} {{ hostvars[host]["inventory_hostname_short"] }}.fedoraproject.org {% if not loop.last %}, {% endif %} {% endfor %}
|
||||
|
||||
}
|
||||
|
||||
define hostgroup {
|
||||
hostgroup_name smtp-mm
|
||||
alias SMTP MailMan Servers
|
||||
members {% for host in groups["smtp-mm"] %} {{ hostvars[host]["inventory_hostname_short"] }}.fedoraproject.org {% if not loop.last %}, {% endif %} {% endfor %}
|
||||
members {% for host in groups["smtp-mm"]|sort %} {{ hostvars[host]["inventory_hostname_short"] }}.fedoraproject.org {% if not loop.last %}, {% endif %} {% endfor %}
|
||||
|
||||
}
|
||||
|
||||
define hostgroup {
|
||||
hostgroup_name proxies
|
||||
alias Web Servers
|
||||
members {% for host in groups["proxies-external"] %} {{ hostvars[host]["inventory_hostname_short"] }}.fedoraproject.org {% if not loop.last %}, {% endif %} {% endfor %}
|
||||
members {% for host in groups["proxies-external"]|sort %} {{ hostvars[host]["inventory_hostname_short"] }}.fedoraproject.org {% if not loop.last %}, {% endif %} {% endfor %}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
# All Servers and associated devices
|
||||
###############
|
||||
## {{ env }}
|
||||
{% for key, value in groups.iteritems() %}
|
||||
{% for key, value in groups.iteritems()|sort %}
|
||||
{% if groups[key] != [] and key != 'newcloud-compute' and key != 'newcloud-control' and key != 'newcloud' %}
|
||||
define hostgroup{
|
||||
hostgroup_name {{ key }}
|
||||
alias {{ key }}
|
||||
members {% for host in groups[key] %}{% if hostvars[host].nagios_Check_Services['ping'] == true %}{{host}}, {% endif %}{% endfor %}
|
||||
members {% for host in groups[key]|sort %}{% if hostvars[host].nagios_Check_Services['ping'] == true %}{{host}}, {% endif %}{% endfor %}
|
||||
|
||||
}
|
||||
{% endif %}
|
||||
|
@ -17,7 +17,7 @@ define hostgroup{
|
|||
define hostgroup{
|
||||
hostgroup_name mincheckgrp
|
||||
alias mincheckgrp
|
||||
members {% for host in groups['all'] %}{% 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_Check_Services['ping'] == true %}{{host}}, {% endif %}{% endfor %}
|
||||
|
||||
}
|
||||
|
||||
|
@ -33,6 +33,6 @@ define hostgroup{
|
|||
define hostgroup {
|
||||
hostgroup_name phx2_mgmt_systems
|
||||
alias phx2_mgmt_systems
|
||||
members {% for host in vars['phx2_management_hosts'] %}{{host}}{% if not loop.last %},{% endif %} {% endfor %}
|
||||
members {% for host in vars['phx2_management_hosts']|sort %}{{host}}{% if not loop.last %},{% endif %} {% endfor %}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
define hostgroup {
|
||||
hostgroup_name CheckSwap
|
||||
alias Swap-Is-Low
|
||||
members {% for host in groups['all'] %}{% if hostvars[host].nagios_Check_Services['swap'] == true and hostvars[host].nagios_Check_Services['ping'] == true %}{{host}}{% if not loop.last %},{% endif %} {% endif %} {% endfor %}
|
||||
members {% for host in groups['all']|sort %}{% if hostvars[host].nagios_Check_Services['swap'] == true and hostvars[host].nagios_Check_Services['ping'] == true %}{{host}}{% if not loop.last %},{% endif %} {% endif %} {% endfor %}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
define hostgroup {
|
||||
hostgroup_name virtservers
|
||||
alias Virtual ServiceGroup
|
||||
members {% for host in groups['virtservers'] %} {{host}}, Disk space /, {{host}}, Total Processes, {{host}}, Check Raid, {{host}}, Swap, {{host}}, SSH,{% endif %}{% endfor %}
|
||||
members {% for host in groups['virtservers']|sort %} {{host}}, Disk space /, {{host}}, Total Processes, {{host}}, Check Raid, {{host}}, Swap, {{host}}, SSH,{% endif %}{% endfor %}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
define hostgroup {
|
||||
hostgroup_name nomail
|
||||
alias No Mail
|
||||
members *, !status, !registry-cdn, !phx2-gw, !ibiblio-gw, !cloud-gw, !bodhost-gw, !coloamer-gw, !dedicated-gw, !host1plus-gw, !internetx-gw, !osuosl-gw, !rdu-gw, !rdu-cc-gw, !tummy-gw, !download-rdu01.fedoraproject.org, !virthost-rdu01.fedoraproject.org, !osbs-control01.phx2.fedoraproject.org, {% for host in groups['bastion'] %}!{{host}}, {% endfor %}{% for host in groups['smtp-mm'] %}!{{host}}, {% endfor %} {% for host in groups['builders'] %}!{{host}},{% endfor %} {% for host in groups['builders-stg'] %}!{{host}},{% endfor %} {% for host in groups['cloud'] %}!{{host}}, {% endfor %} {% for host in vars['phx2_management_limited'] %}!{{host}},{% endfor %} {% for host in vars['phx2_management_hosts'] %}!{{host}}{% if not loop.last %},{% endif %} {% endfor %}
|
||||
members *, !status, !registry-cdn, !phx2-gw, !ibiblio-gw, !cloud-gw, !bodhost-gw, !coloamer-gw, !dedicated-gw, !host1plus-gw, !internetx-gw, !osuosl-gw, !rdu-gw, !rdu-cc-gw, !tummy-gw, !download-rdu01.fedoraproject.org, !virthost-rdu01.fedoraproject.org, !osbs-control01.phx2.fedoraproject.org, {% for host in groups['bastion']|sort %}!{{host}}, {% endfor %}{% for host in groups['smtp-mm']|sort %}!{{host}}, {% endfor %} {% for host in groups['builders']|sort %}!{{host}},{% endfor %} {% for host in groups['builders-stg']|sort %}!{{host}},{% endfor %} {% for host in groups['cloud']|sort %}!{{host}}, {% endfor %} {% for host in vars['phx2_management_limited']|sort %}!{{host}},{% endfor %} {% for host in vars['phx2_management_hosts']|sort %}!{{host}}{% if not loop.last %},{% endif %} {% endfor %}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
define hostgroup {
|
||||
hostgroup_name retrace
|
||||
alias Retrace Hosts
|
||||
members {% for host in groups['retrace'] %}{{host}}, Disk space /,{{host}},Total Processes,{{host}}, Check Raid, {{host}}, Swap, {{host}}, SSH, {% endfor %}
|
||||
members {% for host in groups['retrace']|sort %}{{host}}, Disk space /,{{host}},Total Processes,{{host}}, Check Raid, {{host}}, Swap, {{host}}, SSH, {% endfor %}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
define hostgroup {
|
||||
hostgroup_name vpnclients
|
||||
alias vpnclients
|
||||
members !bastion02.phx2.fedoraproject.org, {% for host in groups['all'] %}{% if ( hostvars[host].vpn == true ) and ( hostvars[host].nagios_Check_Services['ping'] == true ) %}{{host}},{% endif %} {% endfor %}
|
||||
members !bastion02.phx2.fedoraproject.org, {% for host in groups['all']|sort %}{% if ( hostvars[host].vpn == true ) and ( hostvars[host].nagios_Check_Services['ping'] == true ) %}{{host}},{% endif %} {% endfor %}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue