ansible/playbooks/groups/sundries.yml

85 lines
2.5 KiB
YAML

# create a new sundries server
#
# These servers run a number of smaller apps that don't merit their own instances.
#
- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=sundries:sundries_stg"
- name: make the box be real
hosts: sundries:sundries_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:
- base
- rkhunter
- nagios_client
- hosts
- { role: ipa/client, when: env == "staging" }
- { role: fas_client, when: env != "staging" }
- collectd/base
- mod_wsgi
- geoip
- { role: geoip-city-wsgi/app, when: ansible_distribution_major_version|int <= 7 and ansible_distribution == 'RedHat' }
- role: easyfix/gather
when: master_sundries_node|bool
- role: regindexer/build
when: master_sundries_node|bool
- role: bz_review_report
when: master_sundries_node|bool and env != "staging"
- rsyncd
- freemedia
- sudo
- pager_server
- { role: openvpn/client,
when: env != "staging" }
- role: zanata
when: master_sundries_node|bool
- role: fedora-web/build
when: master_sundries_node|bool
- role: fedora-budget/build
when: master_sundries_node|bool
- role: fedora-docs/build
when: master_sundries_node|bool
- role: fedora-docs/translation
when: master_sundries_node|bool
- role: membership-map/build
when: master_sundries_node|bool
- role: developer/build
when: master_sundries_node|bool
- { role: fedmsg/base,
when: master_sundries_node|bool and deployment_type == "prod" }
- { role: rabbit/user,
username: "sundries{{ env_suffix }}",
when: master_sundries_node|bool and deployment_type == "stg" }
- role: fedmsg/base
when: master_sundries_node|bool
- role: nfs/client
mnt_dir: '/srv/docs'
nfs_src_dir: 'openshift_{{ env_short }}_docs'
mount_stg: true
- role: nfs/client
mnt_dir: '/srv/websites'
nfs_src_dir: 'openshift_{{ env_short }}_websites'
mount_stg: true
- role: nfs/client
mnt_dir: '/srv/web/review-stats'
nfs_src_dir: 'openshift_{{ env_short }}_reviewstats'
mount_stg: true
pre_tasks:
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
tasks:
- import_tasks: "{{ tasks_path }}/2fa_client.yml"
when: env != "staging"
- import_tasks: "{{ tasks_path }}/motd.yml"
- import_tasks: "{{ tasks_path }}/reg-server.yml"
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"