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