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:
parent
075447568c
commit
9da15d2b03
6 changed files with 34 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
9
roles/openshift-apps/elnbuildsync/vars/main.yml
Normal file
9
roles/openshift-apps/elnbuildsync/vars/main.yml
Normal 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
|
||||
10
roles/openshift-apps/elnbuildsync/vars/production.yml
Normal file
10
roles/openshift-apps/elnbuildsync/vars/production.yml
Normal 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
|
||||
10
roles/openshift-apps/elnbuildsync/vars/staging.yml
Normal file
10
roles/openshift-apps/elnbuildsync/vars/staging.yml
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue