1
0
Fork 0
forked from infra/ansible

ELNBuildSync: rework variable locations

Instead of having foo: and foo_stg: variables with ternary() selections
based on environment, take a cue from Koschei and use two variable files
in the role, selected by environment name.

rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
This commit is contained in:
Stephen Gallagher 2026-06-15 14:25:59 -04:00
commit 9da15d2b03
Signed by untrusted user: sgallagh
GPG key ID: 45DB85A568286D11
6 changed files with 34 additions and 4 deletions

View file

@ -29,8 +29,9 @@
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- /srv/private/ansible/vars.yml
- /srv/web/infra/ansible/vars/apps/elnbuildsync.yml
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
- /srv/web/infra/ansible/roles/openshift-apps/elnbuildsync/vars/main.yml
- /srv/web/infra/ansible/roles/openshift-apps/elnbuildsync/vars/{{ env }}.yml
roles:
- role: rabbit/user

View file

@ -23,7 +23,7 @@ spec:
containers:
- name: elnbuildsync
image: "image-registry.openshift-image-registry.svc:5000/elnbuildsync/elnbuildsync:{{ ebs_upstream_ref }}"
args: ['--config-branch', "{{ (env == 'production') | ternary(ebs_config_branch, ebs_stg_config_branch) }}" ]
args: ['--config-url', "{{ ebs_config_url }}", '--config-branch', "{{ ebs_config_branch }}"]
startupProbe:
httpGet:
path: /startup

View file

@ -3,6 +3,6 @@ kind: Secret
metadata:
name: ebs-config
stringData:
ebs_db_pw: "{{ (env == 'production')|ternary(ebs_db_password, ebs_stg_db_password) }}"
ebs_smtp_pw: '{{ ebs_smtp_password }}'
ebs_db_pw: "{{ ebs_db_password }}"
ebs_smtp_pw: "{{ ebs_smtp_password | default('') }}"
type: Opaque

View file

@ -0,0 +1,9 @@
---
app: elnbuildsync
description: ELNBuildSync is a tool that listens for Fedora Rawhide builds and re-builds them in the Fedora ELN build environment.
ebs_keytab_app: elnbuildsync
ebs_keytab_username: eln-buildsync
ebs_keytab_key: distrobaker
ebs_keytab_secret_name: keytab
ebs_keytab_path: /{{ ebs_keytab_secret_name }}/{{ ebs_keytab_key }}.keytab

View file

@ -0,0 +1,10 @@
---
ebs_upstream_repo: https://github.com/fedora-eln/elnbuildsync.git
ebs_upstream_ref: 1.1.0
ebs_config_url: https://github.com/fedora-eln/elnbuildsync-config.git
ebs_config_branch: main
ebs_db_user: elnbuildsync
ebs_db_name: elnbuildsync

View file

@ -0,0 +1,10 @@
---
ebs_upstream_repo: https://github.com/fedora-eln/elnbuildsync.git
ebs_upstream_ref: 1.1.0
ebs_config_url: https://github.com/fedora-eln/elnbuildsync-config.git
ebs_config_branch: staging
ebs_db_user: elnbuildsync
ebs_db_name: elnbuildsync