I think this wont break anything

This commit is contained in:
Stephen Smoogen 2017-06-15 23:35:54 +00:00
parent beb54fdcf5
commit 5219c61054
9 changed files with 196 additions and 14 deletions

View file

@ -163,3 +163,43 @@ phx2_management_slowping:
- ppc8-01-fsp.mgmt.fedoraproject.org - ppc8-01-fsp.mgmt.fedoraproject.org
- ppc8-02-fsp.mgmt.fedoraproject.org - ppc8-02-fsp.mgmt.fedoraproject.org
- ppc8-03-fsp.mgmt.fedoraproject.org - ppc8-03-fsp.mgmt.fedoraproject.org
phx2_external:
- bastion01.fedoraproject.org
- bastion02.fedoraproject.org
- pkgs.fedoraproject.org
- stg.fedoraproject.org
- puppet.fedoraproject.org
- koji.fedoraproject.org
- secondary1.fedoraproject.org
- autoqa-stg.fedoraproject.org
- kojipkgs.fedoraproject.org
- pkgs.stg.fedoraproject.org
- bastion-comm01.fedoraproject.org
- admin.stg.fedoraproject.org
- proxy10.fedoraproject.org
- proxy01.fedoraproject.org
- ns04.fedoraproject.org
- s390.koji.fedoraproject.org
- koji.stg.fedoraproject.org
- ppc.koji.fedoraproject.org
- dl01.fedoraproject.org
- dl02.fedoraproject.org
- dl03.fedoraproject.org
- dl04.fedoraproject.org
- dl05.fedoraproject.org
- retrace01.fedoraproject.org
- autoqa.fedoraproject.org
- qadevel.fedoraproject.org
- arm.koji.fedoraproject.org
- fas.fedoraproject.org
- ppc-composer.qa.fedoraproject.org
- retrace02.fedoraproject.org
- noc01.fedoraproject.org
- aarch64.koji.fedoraproject.org
- beaker.fedoraproject.org
- master.centos.org
- ppc-le.koji.fedoraproject.org
- qadevel-stg.fedoraproject.org
- qadevel-stg.qa.fedoraproject.org
- centos02-phx.centos.org

View file

@ -169,7 +169,7 @@
notify: restart nagios notify: restart nagios
## Copy over the services ## Copy over the services
- name: Copy /etc/nagios/services (production) - name: Copy /etc/nagios/services (PHX2)
copy: src=nagios/services/{{ item }} dest=/etc/nagios/services/{{ item }} copy: src=nagios/services/{{ item }} dest=/etc/nagios/services/{{ item }}
with_items: with_items:
- autocloud.cfg - autocloud.cfg
@ -200,14 +200,40 @@
- ssh.cfg - ssh.cfg
- ssl.cfg - ssl.cfg
- swap.cfg - swap.cfg
- templates.cfg
- unbound.cfg - unbound.cfg
- vpnclients.cfg - vpnclients.cfg
- websites.cfg - websites.cfg
- templates.cfg
tags: tags:
- nagios-config - nagios-config
- nagios_server - nagios_server
when: env == "production" when: env == "production" and location == "internal"
notify: restart nagios
## Copy over the services
- name: Copy /etc/nagios/services (External)
copy: src=nagios/services/{{ item }} dest=/etc/nagios/services/{{ item }}
with_items:
- copr.cfg
- db_backups.cfg
- dns.cfg
- haproxy.cfg
- mail_queue.cfg
- pagure_redis.cfg
- ping.cfg
- procs.cfg
- raid.cfg
- smtp-mm.cfg
- ssh.cfg
- ssl.cfg
- swap.cfg
- templates.cfg
- unbound.cfg
- websites.cfg
tags:
- nagios-config
- nagios_server
when: env == "production" and location == "external"
notify: restart nagios notify: restart nagios
## Copy over the services ## Copy over the services
@ -229,6 +255,7 @@
tags: tags:
- nagios-config - nagios-config
- nagios_server - nagios_server
when: location == "internal"
notify: restart nagios notify: restart nagios
## Copy over the plugins ## Copy over the plugins
@ -284,12 +311,11 @@
- coloamer-hosts.cfg - coloamer-hosts.cfg
- dedicatedsolutions-hosts.cfg - dedicatedsolutions-hosts.cfg
- host1plus-hosts.cfg - host1plus-hosts.cfg
- gateway-hosts.cfg
- ibiblio-hosts.cfg - ibiblio-hosts.cfg
- internetx-hosts.cfg - internetx-hosts.cfg
- osuosl-hosts.cfg - osuosl-hosts.cfg
- phx2-hosts.cfg - other.cfg
- staging-hosts.cfg
- phx2-mgmt-hosts.cfg
- rdu-cc-hosts.cfg - rdu-cc-hosts.cfg
- rdu-hosts.cfg - rdu-hosts.cfg
- tummy-hosts.cfg - tummy-hosts.cfg
@ -297,6 +323,27 @@
tags: tags:
- nagios_server - nagios_server
## These are only available to the internal server
- name: Build out nagios host templates (production)
template: src=nagios/hosts/{{item}}.j2 dest=/etc/nagios/hosts/{{item}} mode=0644 owner=root group=root
with_items:
- phx2-hosts.cfg
- phx2-mgmt-hosts.cfg
- staging-hosts.cfg
when: env == "production" and nagios_location == "internal"
tags:
- nagios_server
- name: Build out nagios host templates (production)
template: src=nagios/hosts/{{item}}.j2 dest=/etc/nagios/hosts/{{item}} mode=0644 owner=root group=root
with_items:
- phx2-external.cfg
when: env == "production" and nagios_location == "external"
tags:
- nagios_server
- name: Build out nagios host templates (staging) - name: Build out nagios host templates (staging)
template: src=nagios/hosts/{{item}}.j2 dest=/etc/nagios/hosts/{{item}} mode=0644 owner=root group=root template: src=nagios/hosts/{{item}}.j2 dest=/etc/nagios/hosts/{{item}} mode=0644 owner=root group=root
with_items: with_items:
@ -314,6 +361,15 @@
- vpnclients.cfg - vpnclients.cfg
- nomail.cfg - nomail.cfg
- checkswap.cfg - checkswap.cfg
when: nagios_location == "internal"
tags:
- nagios_server
- name: Build out nagios hostgroup templates
template: src=nagios/hostgroups/{{item}}.j2 dest=/etc/nagios/hostgroups/{{item}} mode=0644 owner=root group=root
with_items:
- all-external.cfg
when: nagios_location == "external"
tags: tags:
- nagios_server - nagios_server
@ -329,6 +385,7 @@
- ipa.cfg - ipa.cfg
- mgmt-http.cfg - mgmt-http.cfg
- mirrorlist.cfg - mirrorlist.cfg
when: nagios_location == "internal"
tags: tags:
- nagios_server - nagios_server

View file

@ -0,0 +1,11 @@
define hostgroup {
hostgroup_name dnsservers
alias DNS Servers
members {% for host in groups["dns"] %}{{ inventory_hostname_short }}.fedoraproject.org, {% endfor %}
}
define hostgroup {
hostgroup_name proxies
alias Web Servers
members {% for host in groups["proxies"] %}{{ inventory_hostname_short }}.fedoraproject.org, {% endfor %}
}

View file

@ -7,7 +7,13 @@ define host {
alias PHX2 Router alias PHX2 Router
use mincheck use mincheck
check_command check-host-alive check_command check-host-alive
{% if vars['nagios_location'] == 'internal' %}
address 10.5.126.254 address 10.5.126.254
{% else %}
address 66.187.228.248
{% endif %}
address
} }
#'ibiblio' #'ibiblio'
@ -17,7 +23,11 @@ define host {
use mincheck use mincheck
check_command check-host-alive check_command check-host-alive
address 152.19.134.129 address 152.19.134.129
{% if vars['nagios_location'] == 'internal' %}
parents phx2-gw parents phx2-gw
{% else %}
{% endif %}
} }
define host { define host {
@ -26,7 +36,11 @@ define host {
use mincheck use mincheck
check_command check-host-alive check_command check-host-alive
address 209.132.184.254 address 209.132.184.254
{% if vars['nagios_location'] == 'internal' %}
parents phx2-gw parents phx2-gw
{% else %}
parents ibiblio-gw
{% endif %}
} }
define host { define host {
@ -35,7 +49,12 @@ define host {
use mincheck use mincheck
check_command check-host-alive check_command check-host-alive
address 174.141.234.1 address 174.141.234.1
{% if vars['nagios_location'] == 'internal' %}
parents phx2-gw parents phx2-gw
{% else %}
parents ibiblio-gw
{% endif %}
} }
define host { define host {
@ -44,7 +63,12 @@ define host {
use mincheck use mincheck
check_command check-host-alive check_command check-host-alive
address 67.203.2.65 address 67.203.2.65
{% if vars['nagios_location'] == 'internal' %}
parents phx2-gw parents phx2-gw
{% else %}
parents ibiblio-gw
{% endif %}
} }
#'dedicatedsolutions' #'dedicatedsolutions'
@ -54,7 +78,12 @@ define host {
use mincheck use mincheck
check_command check-host-alive check_command check-host-alive
address 67.219.144.65 address 67.219.144.65
{% if vars['nagios_location'] == 'internal' %}
parents phx2-gw parents phx2-gw
{% else %}
parents ibiblio-gw
{% endif %}
} }
#'host1plus' #'host1plus'
@ -64,7 +93,12 @@ define host {
use mincheck use mincheck
check_command check-host-alive check_command check-host-alive
address 185.141.164.1 address 185.141.164.1
{% if vars['nagios_location'] == 'internal' %}
parents phx2-gw parents phx2-gw
{% else %}
parents ibiblio-gw
{% endif %}
} }
#'internetx' #'internetx'
@ -74,7 +108,12 @@ define host {
use mincheck use mincheck
check_command check-host-alive check_command check-host-alive
address 85.236.55.1 address 85.236.55.1
{% if vars['nagios_location'] == 'internal' %}
parents phx2-gw parents phx2-gw
{% else %}
parents ibiblio-gw
{% endif %}
} }
# 'osuosl' # 'osuosl'
@ -84,7 +123,12 @@ define host {
use mincheck use mincheck
check_command check-host-alive check_command check-host-alive
address 140.211.169.193 address 140.211.169.193
{% if vars['nagios_location'] == 'internal' %}
parents phx2-gw parents phx2-gw
{% else %}
parents ibiblio-gw
{% endif %}
} }
#'rdu' #'rdu'
@ -94,7 +138,12 @@ define host {
use mincheck use mincheck
check_command check-host-alive check_command check-host-alive
address 128.109.70.198 address 128.109.70.198
{% if vars['nagios_location'] == 'internal' %}
parents phx2-gw parents phx2-gw
{% else %}
parents ibiblio-gw
{% endif %}
} }
#'rdu-cc' #'rdu-cc'
@ -104,7 +153,12 @@ define host {
use mincheck use mincheck
check_command check-host-alive check_command check-host-alive
address 8.43.85.254 address 8.43.85.254
{% if vars['nagios_location'] == 'internal' %}
parents phx2-gw parents phx2-gw
{% else %}
parents ibiblio-gw
{% endif %}
} }
#'tummy' #'tummy'
@ -114,7 +168,12 @@ define host {
use mincheck use mincheck
check_command check-host-alive check_command check-host-alive
address 66.35.62.174 address 66.35.62.174
{% if vars['nagios_location'] == 'internal' %}
parents phx2-gw parents phx2-gw
{% else %}
parents ibiblio-gw
{% endif %}
} }

View file

@ -3,5 +3,9 @@ define host {
alias status-fedora2.rhcloud.com alias status-fedora2.rhcloud.com
use mincheck use mincheck
address status-fedora2.rhcloud.com address status-fedora2.rhcloud.com
{% if vars['nagios_location'] == 'internal' %}
parents phx2-gw parents phx2-gw
{% else %}
parents ibiblio-gw
{% endif %}
} }

View file

@ -0,0 +1,9 @@
{% for host in vars['phx2_external'] %}
define host {
host_name {{ host }}
alias {{ host }}
use mincheck
address {{ host }}
parents phx2-gw
}
{% endfor %}

View file

@ -1,10 +1,10 @@
{% for host in vars['phx2_management_hosts'] %} {% for host in vars['phx2_management_hosts'] %}
define host { define host {
host_name {{ host }} host_name {{ host }}
alias {{ host }} alias {{ host }}
use mincheck use mincheck
address {{ host }} address {{ host }}
parents phx2-gw parents phx2-gw
} }
{% endfor %} {% endfor %}
@ -14,10 +14,10 @@ define host {
{% for host in vars['phx2_management_limited'] %} {% for host in vars['phx2_management_limited'] %}
define host { define host {
host_name {{ host }} host_name {{ host }}
alias {{ host }} alias {{ host }}
use mincheck use mincheck
address {{ host }} address {{ host }}
parents phx2-gw parents phx2-gw
} }
{% endfor %} {% endfor %}

View file

@ -1,2 +1,3 @@
--- ---
nagios_srcdir: 'nagios' nagios_srcdir: 'nagios'
nagios_location: 'internal'

View file

@ -1,2 +1,3 @@
--- ---
nagios_srcdir: 'nagios-external' nagios_srcdir: 'nagios-external'
nagios_location: 'external'