Added templates for people in ansible.
This commit is contained in:
parent
07e24f8448
commit
f4e944af3f
4 changed files with 122 additions and 0 deletions
33
inventory/host_vars/people02.fedoraproject.org
Normal file
33
inventory/host_vars/people02.fedoraproject.org
Normal file
|
@ -0,0 +1,33 @@
|
|||
---
|
||||
freezes: false
|
||||
datacenter: internetx
|
||||
host_backup_targets: ['/srv/web']
|
||||
|
||||
nm: 255.255.255.240
|
||||
gw: 85.236.55.1
|
||||
dns: 8.8.8.8
|
||||
|
||||
ks_url: http://infrastructure.fedoraproject.org/repo/rhel/ks/kvm-rhel-7
|
||||
ks_repo: http://infrastructure.fedoraproject.org/repo/rhel/RHEL7-x86_64/
|
||||
|
||||
vmhost: internetx01.fedoraproject.org
|
||||
volgroup: /dev/VolGuests00
|
||||
eth0_ip: 85.236.55.7
|
||||
postfix_group: vpn
|
||||
|
||||
tcp_ports: [80, 443, 9418]
|
||||
|
||||
nrpe_procs_warn: 900
|
||||
nrpe_procs_crit: 1000
|
||||
|
||||
lvm_size: 20000
|
||||
mem_size: 8192
|
||||
num_cpus: 4
|
||||
|
||||
virt_install_command: /usr/sbin/virt-install -n {{ inventory_hostname }} -r {{ mem_size }}
|
||||
--disk {{ volgroup }}/{{ inventory_hostname }}
|
||||
--vcpus={{ num_cpus }} -l {{ ks_repo }} -x
|
||||
"ksdevice=eth0 ks={{ ks_url }} ip={{ eth0_ip }} netmask={{ nm }}
|
||||
gateway={{ gw }} dns={{ dns }} console=tty0 console=ttyS0
|
||||
hostname={{ inventory_hostname }}"
|
||||
--network=bridge=br0 --autostart --noautoconsole
|
81
playbooks/groups/people.yml
Normal file
81
playbooks/groups/people.yml
Normal file
|
@ -0,0 +1,81 @@
|
|||
# Create a people server
|
||||
#
|
||||
#
|
||||
- name: make the people server
|
||||
hosts: people02.fedoraproject.org
|
||||
user: root
|
||||
gather_facts: False
|
||||
accelerate: "{{ accelerated }}"
|
||||
|
||||
|
||||
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"
|
||||
|
||||
handlers:
|
||||
- include: "{{ handlers }}/restart_services.yml"
|
||||
|
||||
- name: make the box be real
|
||||
hosts: people02.fedoraproject.org
|
||||
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
|
||||
- collectd/base
|
||||
- fas_client
|
||||
- hosts
|
||||
- nagios_client
|
||||
- rkhunter
|
||||
- rsyncd
|
||||
- sudo
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: openvpn/client, when: env != "staging" }
|
||||
- { role: collectd/fedmsg-service, process: fedmsg-hub }
|
||||
- git/hooks
|
||||
- git/make_checkout_seed
|
||||
- git/server
|
||||
- gitolite/base
|
||||
- gitolite/check_fedmsg_hooks
|
||||
- cgit/base
|
||||
- cgit/clean_lock_cron
|
||||
- cgit/make_pkgs_list
|
||||
- clamav
|
||||
- distgit
|
||||
|
||||
|
||||
tasks:
|
||||
- include: "{{ tasks }}/yumrepos.yml"
|
||||
- include: "{{ tasks }}/2fa_client.yml"
|
||||
- include: "{{ tasks }}/motd.yml"
|
||||
- include: "{{ tasks }}/apache.yml"
|
||||
|
||||
handlers:
|
||||
- include: "{{ handlers }}/restart_services.yml"
|
||||
|
||||
- name: setup fedmsg on people
|
||||
hosts: people02.fedoraproject.org
|
||||
user: root
|
||||
gather_facts: True
|
||||
|
||||
vars_files:
|
||||
- /srv/web/infra/ansible/vars/global.yml
|
||||
- "{{ private }}/vars.yml"
|
||||
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
||||
|
||||
roles:
|
||||
- fedmsg/base
|
||||
- fedmsg/hub
|
||||
|
||||
handlers:
|
||||
- include: "{{ handlers }}/restart_services.yml"
|
7
roles/nagios_server/files/nagios/hosts/people02.cfg
Normal file
7
roles/nagios_server/files/nagios/hosts/people02.cfg
Normal file
|
@ -0,0 +1,7 @@
|
|||
define host {
|
||||
host_name people02
|
||||
alias people02.fedoraproject.org
|
||||
use defaulttemplate
|
||||
address people02.fedoraproject.org
|
||||
parents internetx01
|
||||
}
|
1
roles/planet/README
Normal file
1
roles/planet/README
Normal file
|
@ -0,0 +1 @@
|
|||
A role to implement the basic planet work users have.
|
Loading…
Add table
Add a link
Reference in a new issue