fix(upgrade): copy postgresql migration

Use complete path rather than file name for copy to pod.

Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com>
This commit is contained in:
Rajesh Rajendran 2021-07-10 18:55:52 +05:30
parent 688f23d876
commit 376b110cdd

View file

@ -15,7 +15,7 @@
shell: |
file="{{ item|basename }}"
kubectl exec -n db postgresql-postgresql-0 -- /bin/bash -c "rm -rf /tmp/$file"
kubectl cp -n db $file postgresql-postgresql-0:/tmp/
kubectl cp -n db {{ item }} postgresql-postgresql-0:/tmp/
kubectl exec -n db postgresql-postgresql-0 -- /bin/bash -c "PGPASSWORD=asayerPostgres psql -U postgres -f /tmp/$file" &> "{{ playbook_dir }}"/postgresql_init.log
args:
chdir: db/init_dbs/postgresql