ansible/playbooks/groups/batcave.yml
Pierre-Yves Chibon a21b274209 Batcave: add support for fedora-messaging
Install the certificates needed to connect to fedora-messaging
Install a configuration file applications can use to send messages
to the message bus using fedora-messaging.
Create the batcave user in rabbitmq

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2020-05-15 12:57:54 +00:00

84 lines
2.5 KiB
YAML

- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=batcave"
- name: make the box be real
hosts: batcave
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
- ansible-server
- sudo
- collectd/base
- role: git/hooks
when: datacenter != 'iad2'
- role: cgit/base
when: datacenter != 'iad2'
- role: cgit/clean_lock_cron
when: datacenter != 'iad2'
- role: cgit/make_pkgs_list
when: datacenter != 'iad2'
- rsyncd
- apache
- httpd/mod_ssl
- role: httpd/certificate
certname: "{{wildcard_cert_name}}"
SSLCertificateChainFile: "{{wildcard_int_file}}"
- role: openvpn/client
when: datacenter != 'iad2'
- role: rabbit/user
username: "mirror_pagure_ansible{{ env_suffix }}"
when: datacenter != 'iad2'
- role: rabbit/user
username: "batcave{{ env_suffix }}"
when: datacenter != 'iad2'
- role: rabbit/queue
username: "mirror_pagure_ansible{{ env_suffix }}"
queue_name: "mirror_pagure_ansible{{ env_suffix }}"
routing_keys:
- "io.pagure.*.pagure.git.receive"
thresholds:
warning: 10
critical: 100
when: datacenter != 'iad2'
- role: rabbit/queue
username: "mirror_pagure_ansible{{ env_suffix }}"
queue_name: "mirror_pagure_ansible{{ env_suffix }}_13"
routing_keys:
- "io.pagure.*.pagure.git.receive"
thresholds:
warning: 10
critical: 100
when: datacenter != 'iad2'
- role: rabbit/queue
username: "mirror_pagure_ansible{{ env_suffix }}_iad2"
queue_name: "mirror_pagure_ansible{{ env_suffix }}_iad2"
routing_keys:
- "io.pagure.*.pagure.git.receive"
thresholds:
warning: 10
critical: 100
when: datacenter != 'iad2'
- batcave
- { role: nfs/client, when: inventory_hostname.startswith('batcave') and datacenter != 'iad2', mnt_dir: '/srv/web/pub', nfs_src_dir: 'fedora_ftp/fedora.redhat.com/pub' }
- { role: nfs/client, when: inventory_hostname.startswith('batcave01') and datacenter != 'iad2', mnt_dir: '/mnt/fedora/app', nfs_src_dir: 'fedora_app/app' }
- { role: mirror_pagure_ansible, tags: ['mirror_pagure_ansible'] }
pre_tasks:
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
tasks:
- import_tasks: "{{ tasks_path }}/2fa_client.yml"
- import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"