-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
ansible-runner/context/app/project/roles/mirror_appliance/tasks/upgrade-config-vars.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
- name: Look up quay_root, set it to /etc/quay-install if not found. | ||
ansible.builtin.set_fact: | ||
quay_root: "{{ quay_root | default('/etc/quay-install') }}" | ||
|
||
- name: Include vars of the config.yaml into the 'quay_config_file' variable. | ||
ansible.builtin.slurp: | ||
src: "{{ quay_root }}/quay-config/config.yaml" | ||
register: remote_yaml_file | ||
|
||
- name: Parse the remote YAML file and set as a fact | ||
ansible.builtin.set_fact: | ||
quay_config_file: "{{ remote_yaml_file['content'] | b64decode | from_yaml }}" | ||
|
||
- name: Set facts for the pre-existing secrets only if they are a string and not a jinja2 variable in the config.yaml. | ||
ansible.builtin.set_fact: | ||
REDIS_PASSWORD : "{{ quay_config_file['USER_EVENTS_REDIS']['password'] }}" | ||
PGDB_PASSWORD : "{{ quay_config_file['DB_URI'].split('@')[0].split(':')[2] }}" | ||
when: quay_config_file['DATABASE_SECRET_KEY'] is string and quay_config_file['USER_EVENTS_REDIS']['password'] is string and quay_config_file['DB_URI'] is string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters