From 630d3f424d9c7c3627c9d4f13a63f69721efd09f Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Sat, 7 Jan 2017 21:01:28 +0000 Subject: [PATCH] and we should be ready for first round build --- .../nagios-internal.phx2.fedoraproject.org | 22 +++++++++++ inventory/inventory | 4 ++ ...nagios-internal.phx2.fedoraproject.org.yml | 39 +++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 inventory/host_vars/nagios-internal.phx2.fedoraproject.org create mode 100644 playbooks/hosts/nagios-internal.phx2.fedoraproject.org.yml diff --git a/inventory/host_vars/nagios-internal.phx2.fedoraproject.org b/inventory/host_vars/nagios-internal.phx2.fedoraproject.org new file mode 100644 index 0000000000..ad126b0b51 --- /dev/null +++ b/inventory/host_vars/nagios-internal.phx2.fedoraproject.org @@ -0,0 +1,22 @@ +--- +nm: 255.255.255.0 +gw: 10.5.126.254 +dns: 10.5.126.21 + +ks_url: http://10.5.126.23/repo/rhel/ks/kvm-rhel-7 +ks_repo: http://10.5.126.23/repo/rhel/RHEL7-x86_64/ +volgroup: /dev/vg_virthost01 +vmhost: virthost01.phx2.fedoraproject.org +datacenter: phx2 + +tcp_ports: ['22', '80', '443', '67', '68'] +udp_ports: ['67','68','69'] +custom_rules: [ + '-A INPUT -p tcp -m tcp -s 192.168.1.20 --dport 5666 -j ACCEPT', + '-A INPUT -p tcp -m tcp -s 10.5.126.13 --dport 873 -j ACCEPT', + '-A INPUT -p tcp -m tcp -s 192.168.1.59 --dport 873 -j ACCEPT', +] + +eth0_ip: 10.5.126.207 +csi_relationship: | + nagios-internal is currently a development host diff --git a/inventory/inventory b/inventory/inventory index 9de12ee81f..5c2b53c4d4 100644 --- a/inventory/inventory +++ b/inventory/inventory @@ -425,6 +425,10 @@ noc02.fedoraproject.org [nagios-stg] noc01.stg.phx2.fedoraproject.org +# This name is not permanent but is meant for the dev env +[nagios-internal] +nagios-internal.phx2.fedoraproject.org + [notifs-backend] notifs-backend01.phx2.fedoraproject.org diff --git a/playbooks/hosts/nagios-internal.phx2.fedoraproject.org.yml b/playbooks/hosts/nagios-internal.phx2.fedoraproject.org.yml new file mode 100644 index 0000000000..36f633e4d0 --- /dev/null +++ b/playbooks/hosts/nagios-internal.phx2.fedoraproject.org.yml @@ -0,0 +1,39 @@ +# This is a basic playbook +- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=nagios-internal" + +- name: make the box be real + hosts: noc-internal.phx2.fedoraproject.org + user: root + gather_facts: True + + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - "/srv/private/ansible/vars.yml" + - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + + pre_tasks: + - include: "{{ tasks }}/yumrepos.yml" + + roles: + - base + - rkhunter + - nagios_client + - hosts + - fas_client + - collectd/base + - sudo + - mod_wsgi + - role: keytab/service + owner_user: apache + owner_group: apache + service: HTTP + host: "admin.fedoraproject.org" + when: env == "production" + + tasks: + - include: "{{ tasks }}/2fa_client.yml" + - include: "{{ tasks }}/motd.yml" + + handlers: + - include: "{{ handlers }}/restart_services.yml" +