Files
dc-deployments-automation/roles/bitbucket_dataset_restore/tasks/main.yml
Andy Rajagopalan 88e7b87518 remove basic auth
2020-01-17 11:07:27 +11:00

26 lines
832 B
YAML

---
- name: Force all notified handlers to run at this point, not waiting for normal sync points
meta: flush_handlers
- name: wait for port 7990 to be up
wait_for:
port: 7990
delay: 10
timeout: 60
- name: Copy Bitbucket dataset from s3
get_url:
url: "{{ atl_bitbucket_dataset_url }}"
dest: "{{ atl_product_home_shared }}/data/migration/import"
- name: Invoke Import API
uri:
url: http://admin:{{ atl_bitbucket_admin_password }}@localhost:7990/rest/api/1.0/migration/imports
method: POST
follow_redirects: yes
creates: "{{ atl_product_home_shared }}/data/migration/import/lock.file"
body: "{ \"archivePath\": \"{{ atl_bitbucket_dataset_url | basename }}\" }"
body_format: json
return_content: yes
register: response
failed_when: "'INITIALISING' not in response.content"