Add elections to ansible
This commit is contained in:
parent
e53ee4327f
commit
c8ad333687
7 changed files with 103 additions and 0 deletions
9
inventory/group_vars/elections
Normal file
9
inventory/group_vars/elections
Normal file
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
# Define resources for this group of hosts here.
|
||||
lvm_size: 20000
|
||||
mem_size: 2048
|
||||
num_cpus: 2
|
||||
|
||||
tcp_ports: [ 443 ]
|
||||
|
||||
fas_client_groups: sysadmin-noc,sysadmin-web,fi-apprentice
|
9
inventory/group_vars/elections-stg
Normal file
9
inventory/group_vars/elections-stg
Normal file
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
# Define resources for this group of hosts here.
|
||||
lvm_size: 20000
|
||||
mem_size: 1024
|
||||
num_cpus: 2
|
||||
|
||||
tcp_ports: [ 443 ]
|
||||
|
||||
fas_client_groups: sysadmin-noc,sysadmin-web,fi-apprentice
|
10
inventory/host_vars/elections01.phx2.fedoraproject.org
Normal file
10
inventory/host_vars/elections01.phx2.fedoraproject.org
Normal file
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
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-6
|
||||
ks_repo: http://10.5.126.23/repo/rhel/RHEL6-x86_64/
|
||||
volgroup: /dev/vg_guests00
|
||||
eth0_ip: 10.5.126.107
|
||||
vmhost: virthost07.phx2.fedoraproject.org
|
||||
datacenter: phx2
|
10
inventory/host_vars/elections01.stg.fedoraproject.org
Normal file
10
inventory/host_vars/elections01.stg.fedoraproject.org
Normal file
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
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-6
|
||||
ks_repo: http://10.5.126.23/repo/rhel/RHEL6-x86_64/
|
||||
volgroup: /dev/vg_guests
|
||||
eth0_ip: 10.5.126.105
|
||||
vmhost: virthost12.phx2.fedoraproject.org
|
||||
datacenter: phx2
|
10
inventory/host_vars/elections02.phx2.fedoraproject.org
Normal file
10
inventory/host_vars/elections02.phx2.fedoraproject.org
Normal file
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
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-6
|
||||
ks_repo: http://10.5.126.23/repo/rhel/RHEL6-x86_64/
|
||||
volgroup: /dev/vg_guests00
|
||||
eth0_ip: 10.5.126.108
|
||||
vmhost: virthost14.phx2.fedoraproject.org
|
||||
datacenter: phx2
|
|
@ -196,6 +196,13 @@ download-rdu01.vpn.fedoraproject.org
|
|||
download-rdu02.vpn.fedoraproject.org
|
||||
download-rdu03.vpn.fedoraproject.org
|
||||
|
||||
[elections]
|
||||
elections01.phx2.fedoraproject.org
|
||||
elections02.phx2.fedoraproject.org
|
||||
|
||||
[elections-stg]
|
||||
elections01.stg.phx2.fedoraproject.org
|
||||
|
||||
[fas]
|
||||
fakefas01.fedoraproject.org
|
||||
fas01.dev.fedoraproject.org
|
||||
|
|
48
playbooks/groups/elections.yml
Normal file
48
playbooks/groups/elections.yml
Normal file
|
@ -0,0 +1,48 @@
|
|||
- name: make elections
|
||||
hosts: elections;elections-stg
|
||||
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: elections;elections-stg
|
||||
user: root
|
||||
gather_facts: True
|
||||
accelerate: True
|
||||
|
||||
vars_files:
|
||||
- /srv/web/infra/ansible/vars/global.yml
|
||||
- "{{ private }}/vars.yml"
|
||||
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
||||
|
||||
roles:
|
||||
- /srv/web/infra/ansible/roles/base
|
||||
- /srv/web/infra/ansible/roles/rkhunter
|
||||
- /srv/web/infra/ansible/roles/denyhosts
|
||||
- /srv/web/infra/ansible/roles/nagios_client
|
||||
- /srv/web/infra/ansible/roles/fas_client
|
||||
|
||||
tasks:
|
||||
- include: "{{ tasks }}/hosts.yml"
|
||||
- include: "{{ tasks }}/yumrepos.yml"
|
||||
- include: "{{ tasks }}/2fa_client.yml"
|
||||
- include: "{{ tasks }}/motd.yml"
|
||||
- include: "{{ tasks }}/sudo.yml"
|
||||
- include: "{{ tasks }}/openvpn_client.yml"
|
||||
when: env != "staging"
|
||||
- include: "{{ tasks }}/apache.yml"
|
||||
- include: "{{ tasks }}/mod_wsgi.yml"
|
||||
|
||||
handlers:
|
||||
- include: "{{ handlers }}/restart_services.yml"
|
Loading…
Add table
Add a link
Reference in a new issue