Define the bodhi variables in a single place

This removes the different definitions of `sent_topics` for Bodhi, which
were causing issue https://pagure.io/releng/issue/11827

It also brings the bodhi options in the `os_control*` group vars into
the same vars file.

Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
Aurélien Bompard 2023-12-15 12:54:12 +01:00
parent 5546164ada
commit 79949846e2
No known key found for this signature in database
GPG key ID: 31584CFEB9BF64AD
7 changed files with 12 additions and 10 deletions

View file

@ -1,4 +1 @@
---
# Set the Bodhi variables
bodhi_version: "7.2.2"
bodhi_openshift_pods: 1

View file

@ -1,4 +1 @@
---
# Set the Bodhi variables
bodhi_version: "7.2.2"
bodhi_openshift_pods: 1

View file

@ -28,6 +28,7 @@
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:
@ -99,7 +100,7 @@
thresholds:
warning: 10
critical: 100
sent_topics: ^org\.fedoraproject\.{{ env_short }}\.(bodhi|pungi)\..*
sent_topics: "{{ bodhi_sent_topics }}"
- role: rabbit/queue
username: "bodhi{{ env_suffix }}"
@ -110,7 +111,7 @@
warning: 10
critical: 100
# We have to repeat this line for now (only the last one counts)
sent_topics: ^org\.fedoraproject\.{{ env_short }}\.(bodhi|pungi)\..*
sent_topics: "{{ bodhi_sent_topics }}"
tasks:
- name: create secondary volume dir for stg bodhi

View file

@ -8,6 +8,7 @@
tasks:
- include_vars: dir=/srv/web/infra/ansible/vars/all/ ignore_files=README
- include_vars: /srv/web/infra/ansible/vars/apps/bodhi.yml
- name: Check for running composes
shell: "curl https://bodhi{{env_suffix}}.fedoraproject.org/composes/"
register: composes

View file

@ -20,6 +20,7 @@
pre_tasks:
- include_vars: dir=/srv/web/infra/ansible/vars/all/ ignore_files=README
- include_vars: /srv/web/infra/ansible/vars/apps/bodhi.yml
- set_fact:
args:
bodhi_version: "{{ bodhi_version }}"
@ -32,7 +33,7 @@
thresholds:
warning: 10
critical: 100
sent_topics: ^org\.fedoraproject\.{{ env_short }}\.bodhi\..*
sent_topics: "{{ bodhi_sent_topics }}"
- role: openshift/project
app: bodhi

View file

@ -124,7 +124,7 @@
topic_permissions:
- vhost: /pubsub
read_priv: .*
write_priv: ^org\.fedoraproject\.{{ env_short }}\.bodhi\..*
write_priv: "{{ bodhi_sent_topics }}"
tags:
- rabbitmq_cluster
- config

5
vars/apps/bodhi.yml Normal file
View file

@ -0,0 +1,5 @@
---
# Set the Bodhi variables
bodhi_version: "{{ (env == 'production')|ternary('7.2.2', '7.2.2') }}"
bodhi_openshift_pods: 1
bodhi_sent_topics: ^org\.fedoraproject\.{{ env_short }}\.(bodhi|pungi)\..*