Installer: quote password where it applies

Prior to this change, password having shell interpretable character
would break the installer (e.g '&', '(', etc... )

This commits rely on the `quote` filter from ansible to ensure those
password are properly quoted where it applies

Fixes: https://github.com/ansible/awx/issues/3943
Signed-off-by: Yanis Guenane <yguenane@redhat.com>
This commit is contained in:
Yanis Guenane
2019-06-03 11:45:21 +02:00
parent d8a80f9f3e
commit 11630a8803
7 changed files with 14 additions and 14 deletions

View File

@@ -75,7 +75,7 @@
- name: Temporarily grant createdb role
shell: |
{{ kubectl_or_oc }} -n {{ kubernetes_namespace }} \
exec -i ansible-tower-management -- bash -c "PGPASSWORD={{ pg_password }} \
exec -i ansible-tower-management -- bash -c "PGPASSWORD={{ pg_password | quote }} \
psql \
--host={{ pg_hostname | default('postgresql') }} \
--port={{ pg_port | default('5432') }} \
@@ -87,7 +87,7 @@
- name: Perform a PostgreSQL restore
shell: |
{{ kubectl_or_oc }} -n {{ kubernetes_namespace }} \
exec -i ansible-tower-management -- bash -c "PGPASSWORD={{ pg_password }} \
exec -i ansible-tower-management -- bash -c "PGPASSWORD={{ pg_password | quote }} \
psql \
--host={{ pg_hostname | default('postgresql') }} \
--port={{ pg_port | default('5432') }} \
@@ -98,7 +98,7 @@
- name: Revoke createdb role
shell: |
{{ kubectl_or_oc }} -n {{ kubernetes_namespace }} \
exec -i ansible-tower-management -- bash -c "PGPASSWORD={{ pg_password }} \
exec -i ansible-tower-management -- bash -c "PGPASSWORD={{ pg_password | quote }} \
psql \
--host={{ pg_hostname | default('postgresql') }} \
--port={{ pg_port | default('5432') }} \