diff --git a/inventory/host_vars/noc03.phx2.fedoraproject.org b/inventory/host_vars/noc03.phx2.fedoraproject.org new file mode 100644 index 0000000000..9b66457acb --- /dev/null +++ b/inventory/host_vars/noc03.phx2.fedoraproject.org @@ -0,0 +1,12 @@ +--- +nm: 255.255.255.0 +gw: 10.5.126.254 +dns: 10.5.126.21 + +ks_url: http://infrastructure.fedoraproject.org/repo/rhel/ks/kvm-rhel-7 +ks_repo: http://infrastructure.fedoraproject.org/repo/rhel/RHEL7-x86_64/ +volgroup: /dev/VolGuests00 +vmhost: virthost02.phx2.fedoraproject.org +datacenter: phx2 + +eth0_ip: 10.5.126.237 diff --git a/inventory/inventory b/inventory/inventory index 88f1d1b5a9..937b08b7e6 100644 --- a/inventory/inventory +++ b/inventory/inventory @@ -309,6 +309,9 @@ lockbox-comm01.qa.fedoraproject.org noc01.phx2.fedoraproject.org noc02.fedoraproject.org +[nagios-phx] +noc03.phx2.fedoraproject.org + [notifs-backend] notifs-backend01.phx2.fedoraproject.org diff --git a/playbooks/groups/nagios_phx2.yml b/playbooks/groups/nagios_phx2.yml new file mode 100644 index 0000000000..172546de25 --- /dev/null +++ b/playbooks/groups/nagios_phx2.yml @@ -0,0 +1,69 @@ +# TODO: Generalize this, fix "hosts:" etc. +- name: make nagios/noc server + hosts: nagios-phx + user: root + gather_facts: False + + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - "{{ private }}/vars.yml" + - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + + tasks: + - include: "{{ tasks }}/virt_instance_create.yml" + - include: "{{ tasks }}/accelerate_prep.yml" + + handlers: + - include: "{{ handlers }}/restart_services.yml" + +- name: make the box be real + hosts: nagios-phx + user: root + gather_facts: True + accelerate: "{{ accelerated }}" + + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - "{{ private }}/vars.yml" + - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + + roles: + - base + - rkhunter + - denyhosts + - nagios_client + - hosts + - fas_client + - collectd/base + - rsyncd + - sudo + + tasks: + - include: "{{ tasks }}/yumrepos.yml" + - include: "{{ tasks }}/2fa_client.yml" + - include: "{{ tasks }}/motd.yml" + - include: "{{ tasks }}/openvpn_client.yml" + when: env != "staging" + - include: "{{ tasks }}/apache.yml" + - include: "{{ tasks }}/mod_wsgi.yml" + + handlers: + - include: "{{ handlers }}/restart_services.yml" + +- name: deploy service-specific config + hosts: nagios-phx + user: root + gather_facts: True + accelerate: "{{ accelerated }}" + + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - "{{ private }}/vars.yml" + - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + + handlers: + - include: "{{ handlers }}/restart_services.yml" + + roles: + - nagios_server + - fedmsg/base