Template only what is needed from secrets and awx cro

This commit is contained in:
Christian M. Adams
2021-04-09 16:32:59 -04:00
parent 82efe05343
commit 8ed0b1fe61
6 changed files with 28 additions and 83 deletions

View File

@@ -69,13 +69,17 @@
namespace: "{{ tower_backup_pvc_namespace }}"
pod: "{{ meta.name }}-db-management"
command: >-
chmod 0600 {{ backup_dir }}/tower.db && chown postgres:root {{ backup_dir }}/tower.db
bash -c "chmod 0600 {{ backup_dir }}/tower.db && chown postgres:root {{ backup_dir }}/tower.db"
- name: Get the postgres pod information
set_fact:
resolvable_db_host: "{{ awx_postgres_host }}.{{ meta.namespace }}.svc.cluster.local"
- name: Set pg_dump command
set_fact:
pgdump: >-
pg_dump --clean --create
-h {{ awx_postgres_host }}
-h {{ resolvable_db_host }}
-U {{ awx_postgres_user }}
-d {{ awx_postgres_database }}
-p {{ awx_postgres_port }}