Skip to content

Commit

Permalink
restore: Fix resolvable_db_host fact for postgres
Browse files Browse the repository at this point in the history
During postgresql restore, the resolvable_db_host fact is only set for
managed postgresql database but not for unmanaged one.
This fixes this issue.

Signed-off-by: Dimitri Savineau <[email protected]>
  • Loading branch information
dsavineau committed May 15, 2024
1 parent 1adc8d6 commit 49ba951
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions roles/restore/tasks/postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@

- name: Set full resolvable host name for postgres pod
set_fact:
resolvable_db_host: "{{ eda_postgres_host }}.{{ ansible_operator_meta.namespace }}.svc.{{ cluster_name }}"
resolvable_db_host: "{{ (eda_postgres_type == 'managed') | ternary(eda_postgres_host + '.' + ansible_operator_meta.namespace + '.svc.' + cluster_name, eda_postgres_host) }}"
no_log: "{{ no_log }}"
when: eda_postgres_type == 'managed'

- name: Set pg_restore command
set_fact:
Expand Down

0 comments on commit 49ba951

Please sign in to comment.