Files
fedora-infra_ansible/playbooks/groups/bodhi-backend.yml
Kevin Fenzi 1ddf40d2dc bodhi-backend: drop some more iad2 conditionals
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-07-03 06:46:19 -07:00

128 lines
3.8 KiB
YAML

# create a new bodhi-backend system
#
# This group makes bodhi-backend servers.
# They are used by releng to push updates with bodhi.
# They also run some misc releng scripts.
#
---
- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml"
vars:
myhosts: "bodhi_backend:bodhi_backend_stg"
# Once the instance exists, configure it.
- name: Make bodhi-backend server system
hosts: bodhi_backend:bodhi_backend_stg
user: root
gather_facts: true
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/web/infra/ansible/vars/all/00-FedoraCycleNumber.yaml"
- "/srv/web/infra/ansible/vars/all/FedoraBranched.yaml"
- "/srv/web/infra/ansible/vars/all/FedoraBranchedNumber.yaml"
- "/srv/web/infra/ansible/vars/all/FedoraRawhideNumber.yaml"
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
pre_tasks:
- include_vars: dir=/srv/web/infra/ansible/vars/all/ ignore_files=README
- include_vars: /srv/web/infra/ansible/vars/apps/bodhi.yml
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
roles:
- base
- nagios_client
- zabbix/zabbix_agent
- collectd/base
- hosts
- ipa/client
- sudo
- rkhunter
- role: nfs/client
mnt_dir: '/mnt/fedora_koji'
nfs_src_dir: 'fedora_koji'
- bodhi2/backend
- role: nfs/client
mnt_dir: '/mnt/koji/ostree'
nfs_src_dir: 'fedora_ostree_content/ostree'
when: env != 'staging'
- role: nfs/client
mnt_dir: '/mnt/koji/compose/ostree'
nfs_src_dir: 'fedora_ostree_content/compose/ostree'
when: env != 'staging'
- role: nfs/client
mnt_dir: '/mnt/koji/ostree'
nfs_src_dir: 'fedora_ostree_content_stg/ostree'
when: env == 'staging'
- role: nfs/client
mnt_dir: '/mnt/koji/compose/ostree'
nfs_src_dir: 'fedora_ostree_content_stg/compose/ostree'
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: '/pub/'
nfs_src_dir: 'fedora_ftp/fedora.redhat.com/pub/'
- role: nfs/client
mnt_dir: '/pub/archive'
nfs_src_dir: 'fedora_ftp_archive'
- role: keytab/service
owner_user: apache
owner_group: apache
service: bodhi
host: "bodhi{{ env_suffix }}.fedoraproject.org"
- role: push-container-registry
cert_dest_dir: "/etc/docker/certs.d/registry{{ env_suffix }}.fedoraproject.org"
cert_src: "{{private}}/files/docker-registry/{{env}}/pki/issued/containerstable.crt"
key_src: "{{private}}/files/docker-registry/{{env}}/pki/private/containerstable.key"
certs_group: apache
- role: rabbit/queue
queue_username: "bodhi{{ env_suffix }}"
queue_name: "bodhi{{ env_suffix }}_composer"
queue_routing_keys: "{{ bodhi_message_routing_keys }}"
queue_thresholds:
warning: 10
critical: 100
user_sent_topics: "{{ bodhi_sent_topics }}"
- role: rabbit/queue
queue_username: "bodhi{{ env_suffix }}"
queue_name: "bodhi{{ env_suffix }}_koji_sync_listener{{ env_suffix }}"
queue_routing_keys:
- "io.pagure.*.pagure.issue.edit"
queue_thresholds:
warning: 10
critical: 100
# We have to repeat this line for now (only the last one counts)
user_sent_topics: "{{ bodhi_sent_topics }}"
tasks:
- name: Create secondary volume dir for stg bodhi
ansible.builtin.file: dest=/mnt/koji/vol state=directory owner=apache group=apache mode=0755
tags: bodhi
when: env == 'staging'
- name: Create symlink for stg/prod secondary volume
ansible.builtin.file: src=/mnt/fedora_koji_prod/koji dest=/mnt/koji/vol/prod state=link
tags: bodhi
when: env == 'staging'
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"