First cut at a secondary01 playbook/setup.

This commit is contained in:
Kevin Fenzi 2015-04-30 16:33:43 +00:00
parent 23653b6e48
commit 20c44f2ea1
3 changed files with 85 additions and 15 deletions

View file

@ -1,15 +1,9 @@
---
# Define resources for this group of hosts here.
lvm_size: 30000
mem_size: 8192
num_cpus: 4
datacenter: phx2
tcp_ports: [80, 443, 873]
rsyncd_conf: "rsyncd.conf.download-{{ datacenter }}"
nrpe_procs_warn: 900
nrpe_procs_crit: 1000
# for systems that do not match the above - specify the same parameter in
# the host_vars/$hostname file
tcp_ports: [ 80, 443, 111, 2049 ]
udp_ports: [ 111, 2049 ]
fas_client_groups: sysadmin-noc,alt-sugar,alt-k12linux,altvideos,hosted-content,mips-content,s390_content,fi-apprentice,qa-deltaisos
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid"
# nfs mount options, overrides the all/default
nfs_mount_opts: "ro,hard,bg,intr,noatime,nodev,nosuid,actimeo=600"

View file

@ -1,10 +1,29 @@
---
lvm_size: 20000
mem_size: 10240
num_cpus: 4
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_guests00
volgroup: /dev/vg_guests
eth0_ip: 10.5.126.27
vmhost: virthost15.phx2.fedoraproject.org
eth1_ip: 10.5.127.66
vmhost: virthost02.phx2.fedoraproject.org
datacenter: phx2
# We define this here to override the global one because we need eth1
virt_install_command: virt-install -n {{ inventory_hostname }} -r {{ mem_size }}
--disk bus=virtio,path={{ volgroup }}/{{ inventory_hostname }}
--vcpus={{ num_cpus }} -l {{ ks_repo }} -x
"ksdevice=eth0 ks={{ ks_url }} console=tty0 console=ttyS0
hostname={{ inventory_hostname }} nameserver={{ dns }}
ip={{ eth0_ip }}::{{ gw }}:{{ nm }}:{{ inventory_hostname }}:eth0:none
ip={{ eth1_ip }}:::{{ nm }}:{{ inventory_hostname }}-nfs:eth1:none"
--network=bridge=br0,model=virtio --network=bridge=br1,model=virtio
--autostart --noautoconsole

View file

@ -0,0 +1,57 @@
- name: make secondary arch download
hosts: secondary
user: root
gather_facts: False
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
tasks:
- include: "{{ tasks }}/virt_instance_create.yml"
handlers:
- include: "{{ handlers }}/restart_services.yml"
- name: setup secondary arch download server
hosts: secondary
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"
roles:
- base
- rkhunter
- nagios_client
- hosts
- fas_client
- collectd/base
- download
- rsyncd
- sudo
- { role: nfs/client,
mnt_dir: '/srv/pub/archive',
nfs_src_dir: 'fedora_ftp/fedora.redhat.com/pub/archive' }
- { role: nfs/client,
mnt_dir: '/srv/pub/alt',
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid,nfsvers=3",
nfs_src_dir: 'fedora_ftp/fedora.redhat.com/pub/alt' }
- { role: nfs/client,
mnt_dir: '/srv/pub/secondary',
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid,nfsvers=3",
nfs_src_dir: 'fedora_ftp/fedora.redhat.com/pub/fedora-secondary' }
tasks:
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"
- include: "{{ tasks }}/apache.yml"
handlers:
- include: "{{ handlers }}/restart_services.yml"