25 lines
890 B
YAML
25 lines
890 B
YAML
- block:
|
|
- name: Set DB namespace for secret lookup
|
|
set_fact:
|
|
db_namespace: "{{ wikijs_db_namespace | default(postgres_db_namespace) | default(postgres_namespace) | default(postgres_operator_namespace) | default(namespace) }}"
|
|
|
|
- name: Set DB secret name for lookup
|
|
set_fact:
|
|
db_secret_name: "bitwarden.{{ postgres_db_team | default(namespace) }}-postgres.credentials.postgresql.acid.zalan.do"
|
|
|
|
- name: Lookup WikiJS secret
|
|
set_fact:
|
|
wikijs_db_secret: "{{ lookup('k8s', kind='Secret', namespace=db_namespace, resource_name=db_secret_name) }}"
|
|
|
|
- debug:
|
|
msg: "{{ wikijs_db_secret }}"
|
|
verbosity: 2
|
|
|
|
- name: Set WikiJS username
|
|
set_fact:
|
|
wikijs_db_username: "{{ wikijs_db_secret.data.username | b64decode }}"
|
|
|
|
- name: Set WikiJS password
|
|
set_fact:
|
|
wikijs_db_password: "{{ wikijs_db_secret.data.password | b64decode }}"
|