147 lines
3.6 KiB
YAML
147 lines
3.6 KiB
YAML
- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=odcs:odcs_stg"
|
|
|
|
- name: make the box be real
|
|
hosts: odcs:odcs_stg
|
|
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:
|
|
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
|
|
|
|
roles:
|
|
- base
|
|
- rkhunter
|
|
- nagios_client
|
|
- hosts
|
|
- fas_client
|
|
- rsyncd
|
|
- sudo
|
|
- collectd/base
|
|
|
|
tasks:
|
|
- import_tasks: "{{ tasks_path }}/2fa_client.yml"
|
|
- import_tasks: "{{ tasks_path }}/motd.yml"
|
|
|
|
handlers:
|
|
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|
|
|
|
- name: openvpn on the prod frontend nodes
|
|
hosts: odcs_frontend
|
|
user: root
|
|
gather_facts: True
|
|
|
|
vars_files:
|
|
- /srv/web/infra/ansible/vars/global.yml
|
|
- "/srv/private/ansible/vars.yml"
|
|
- "{{ vars_path }}/{{ ansible_distribution }}.yml"
|
|
|
|
roles:
|
|
- openvpn/client
|
|
|
|
handlers:
|
|
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|
|
|
|
- name: Set up odcs frontend service
|
|
hosts: odcs_frontend:odcs_frontend_stg
|
|
user: root
|
|
gather_facts: True
|
|
|
|
vars_files:
|
|
- /srv/web/infra/ansible/vars/global.yml
|
|
- "/srv/private/ansible/vars.yml"
|
|
- "{{ vars_path }}/{{ ansible_distribution }}.yml"
|
|
|
|
roles:
|
|
- mod_wsgi
|
|
- fedmsg/base
|
|
- odcs/frontend
|
|
- role: nfs/client
|
|
mnt_dir: '/mnt/fedora_koji'
|
|
nfs_src_dir: 'fedora_koji'
|
|
when: env != 'staging'
|
|
- role: nfs/client
|
|
mnt_dir: '/mnt/fedora_koji_prod'
|
|
nfs_src_dir: 'fedora_koji'
|
|
when: env == 'staging'
|
|
- role: nfs/client
|
|
mnt_dir: '/srv/odcs'
|
|
nfs_src_dir: 'fedora_odcs_stg'
|
|
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid,nfsvers=3"
|
|
when: env == 'staging'
|
|
- role: nfs/client
|
|
mnt_dir: '/srv/odcs'
|
|
nfs_src_dir: 'fedora_odcs'
|
|
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid,nfsvers=3"
|
|
when: env != 'staging'
|
|
|
|
handlers:
|
|
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|
|
|
|
- name: Set up odcs backend service
|
|
hosts: odcs_backend:odcs_backend_stg
|
|
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:
|
|
- role: odcs/backend
|
|
- role: fedmsg/base
|
|
- role: keytab/service
|
|
service: odcs
|
|
owner_user: odcs
|
|
owner_group: odcs
|
|
host: "odcs{{env_suffix}}.fedoraproject.org"
|
|
- role: fedmsg/hub
|
|
|
|
handlers:
|
|
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|
|
|
|
- name: Set up /mnt/koji on both the frontend and backend
|
|
hosts: odcs:odcs_stg
|
|
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:
|
|
- role: nfs/client
|
|
mnt_dir: '/mnt/fedora_koji'
|
|
nfs_src_dir: 'fedora_koji'
|
|
when: env != 'staging'
|
|
|
|
# In staging, we mount fedora_koji as read only (see nfs_mount_opts)
|
|
- role: nfs/client
|
|
mnt_dir: '/mnt/fedora_koji_prod'
|
|
nfs_src_dir: 'fedora_koji'
|
|
when: env == 'staging'
|
|
|
|
- role: nfs/client
|
|
mnt_dir: '/srv/odcs'
|
|
nfs_src_dir: 'fedora_odcs_stg'
|
|
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid,nfsvers=3"
|
|
when: env == 'staging'
|
|
|
|
- role: nfs/client
|
|
mnt_dir: '/srv/odcs'
|
|
nfs_src_dir: 'fedora_odcs'
|
|
nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid,nfsvers=3"
|
|
when: env != 'staging'
|
|
|
|
post_tasks:
|
|
- file: src=/mnt/fedora_koji/koji dest=/mnt/koji state=link
|
|
tags: nfs/client
|
|
|
|
handlers:
|
|
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|