From 1a1f4fb419a669be2897da4c34dc4fe369da160a Mon Sep 17 00:00:00 2001 From: Andy Rajagopalan Date: Tue, 17 Dec 2019 23:05:26 -0800 Subject: [PATCH] add is defined --- roles/bitbucket_dataset_restore/tasks/main.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/roles/bitbucket_dataset_restore/tasks/main.yml b/roles/bitbucket_dataset_restore/tasks/main.yml index 4cbccfa..5abc720 100644 --- a/roles/bitbucket_dataset_restore/tasks/main.yml +++ b/roles/bitbucket_dataset_restore/tasks/main.yml @@ -33,7 +33,8 @@ until: output.status == 200 retries: 6 delay: 15 - failed_when: "'INITIALISING' not in output.content" + failed_when: output is defined and output.json.state != 'INITIALISING' + #failed_when: "'INITIALISING' not in output.content" - name: get status of import debug: var=output.json.state @@ -51,7 +52,8 @@ body_format: json return_content: yes register: import_status - until: "'COMPLETED' in import_status.content" + until: import_status is defined and import_status.content == 'COMPLETED' + #until: "'COMPLETED' in import_status.content" retries: 30 delay: 10 @@ -59,4 +61,4 @@ file: path: "{{ atl_product_home_shared }}/data/migration/import/lock.file" state: touch - when: import_status.state == 'COMPLETED' \ No newline at end of file + when: import_status.state == 'COMPLETED' \ No newline at end of file