ansible/playbooks/groups/nuancier.yml
Nils Philippsen 2d4ec8d259 Apply openvpn/client role before ipa/client
This is so hosts on the Fedora VPN are able to talk to IPA before they
try to enroll.

Signed-off-by: Nils Philippsen <nils@redhat.com>
2021-03-24 18:19:11 +01:00

129 lines
3.2 KiB
YAML

# create a new nuancier server
# NOTE: should be used with --limit most of the time
# NOTE: make sure there is room/space for this server on the vmhost
# NOTE: most of these vars_path come from group_vars/nuancier* or from hostvars
- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=nuancier:nuancier_stg"
- name: make the box be real
hosts: nuancier:nuancier_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: openvpn/client,
when: env != "staging" }
- ipa/client
- collectd/base
- sudo
- mod_wsgi
pre_tasks:
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
tasks:
- import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: set up fedmsg
hosts: nuancier:nuancier_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:
- fedmsg/base
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: set up gluster on stg
hosts: nuancier_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: gluster/server
glusterservername: gluster
username: "{{ nuancier_gluster_username }}"
password: "{{ nuancier_gluster_password }}"
owner: root
group: root
datadir: /srv/glusterfs/nuancier-stg
- role: gluster/client
glusterservername: gluster
servers:
- nuancier01.stg.iad2.fedoraproject.org
- nuancier02.stg.iad2.fedoraproject.org
username: "{{ nuancier_gluster_username }}"
password: "{{ nuancier_gluster_password }}"
owner: apache
group: root
mountdir: /var/cache/nuancier
- name: set up gluster on prod
hosts: nuancier
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: gluster/server
glusterservername: gluster
username: "{{ nuancier_gluster_username }}"
password: "{{ nuancier_gluster_password }}"
owner: root
group: root
datadir: /srv/glusterfs/nuancier
- role: gluster/client
glusterservername: gluster
servers:
- nuancier01.iad2.fedoraproject.org
- nuancier02.iad2.fedoraproject.org
username: "{{ nuancier_gluster_username }}"
password: "{{ nuancier_gluster_password }}"
owner: apache
group: root
mountdir: /var/cache/nuancier
- name: deploy nuancier itself
hosts: nuancier:nuancier_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:
- nuancier
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"