From 0a3e85559257357330c372c715e53d90f270a6f8 Mon Sep 17 00:00:00 2001 From: Andy Rajagopalan Date: Fri, 13 Dec 2019 16:00:02 -0800 Subject: [PATCH] add import status --- roles/bitbucket_dataset_restore/tasks/main.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/roles/bitbucket_dataset_restore/tasks/main.yml b/roles/bitbucket_dataset_restore/tasks/main.yml index d0eab5b..33dc3ca 100644 --- a/roles/bitbucket_dataset_restore/tasks/main.yml +++ b/roles/bitbucket_dataset_restore/tasks/main.yml @@ -50,4 +50,13 @@ force_basic_auth: yes body_format: json return_content: yes - register: import_status \ No newline at end of file + register: import_status + until: "'COMPLETED' in import_status.content" + retries: 30 + delay: 10 + +- name: create lock file + file: + path: "{{ atl_product_home_shared }}/data/migration/import/lock.file" + state: touch + when: import_status.state = 'COMPLETED' \ No newline at end of file