From 192d89f5903acded34b0b69c784d55b7838f8155 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Fri, 6 Aug 2021 20:52:52 +0530 Subject: [PATCH] fix(migration): fix the data paths for migration of dbs. Signed-off-by: Rajesh Rajendran --- scripts/helm/migration.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/helm/migration.yaml b/scripts/helm/migration.yaml index 41637d7c5..4d7c2ce64 100644 --- a/scripts/helm/migration.yaml +++ b/scripts/helm/migration.yaml @@ -3,13 +3,15 @@ gather_facts: false environment: KUBECONFIG: "{{ kubeconfig_path }}" + vars: + db_path: [] tasks: - debug: var: migration_versions - block: - name: generating migration db paths set_fact: - db_path: "{{dst_list | default([])}} + [ '{{playbook_dir}}/db/init_dbs/postgresql/{{ item }}/*.sql' ]" + db_path: "{{ db_path }} + [ '{{playbook_dir}}/db/init_dbs/postgresql/{{ item }}/*.sql' ]" with_items: "{{ migration_versions.split(',') }}" - name: Migrate postgresql shell: | @@ -23,6 +25,9 @@ tags: - postgresql - block: + - name: Resetting the db path + set_fact: + db_path: [] - name: generating migration db paths set_fact: db_path: "{{dst_list | default([])}} + [ '{{ item[0] }}/*.sql' ]"