mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 15:09:32 -02:30
Copy over downstream change
Allows users to specify pg_username that has uppercase letters to restore succesfully
This commit is contained in:
@@ -98,7 +98,7 @@
|
||||
POD=$({{ kubectl_or_oc }} -n {{ kubernetes_namespace }} \
|
||||
get pods -l=name=postgresql --field-selector status.phase=Running -o jsonpath="{.items[0].metadata.name}")
|
||||
{{ kubectl_or_oc }} exec $POD -n {{ kubernetes_namespace }} -- bash -c "\
|
||||
psql --dbname=template1 -c 'ALTER USER {{ pg_username }} CREATEDB;'"
|
||||
psql --dbname=template1 -c 'ALTER USER \"{{ pg_username }}\" CREATEDB;'"
|
||||
|
||||
- name: Perform a PostgreSQL restore
|
||||
shell: |
|
||||
@@ -113,7 +113,7 @@
|
||||
POD=$({{ kubectl_or_oc }} -n {{ kubernetes_namespace }} \
|
||||
get pods -l=name=postgresql --field-selector status.phase=Running -o jsonpath="{.items[0].metadata.name}")
|
||||
{{ kubectl_or_oc }} exec $POD -n {{ kubernetes_namespace }} -- bash -c "\
|
||||
psql --dbname=template1 -c 'ALTER USER {{ pg_username }} NOCREATEDB;'"
|
||||
psql --dbname=template1 -c 'ALTER USER \"{{ pg_username }}\" NOCREATEDB;'"
|
||||
when: pg_hostname is not defined or pg_hostname == ''
|
||||
|
||||
- name: Remove restore directory
|
||||
|
||||
Reference in New Issue
Block a user