Blue-cloud specific conductor workflows
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.0 KiB

---
- name: Create temporary build directory
tempfile:
state: directory
suffix: build
register: target
- name: Generate workflows
template:
src: "templates/{{ item }}.json.j2"
dest: "{{ target.path }}/{{ item }}.json"
loop: "{{ workflows }}"
- name: Undeploy previous versions of workflows
uri:
url: "{{ conductor_workflowdef_endpoint }}/{{ item }}/1"
method: DELETE
force_basic_auth: yes
url_username: "{{ user }}"
url_password: "{{ password }}"
follow_redirects: yes
status_code: [200, 204, 404, 500]
loop:
"{{ workflows }}"
- name: Upload workflows
uri:
url: "{{ conductor_workflowdef_endpoint }}"
method: POST
src: "{{ target.path }}/{{ item }}.json"
body_format: json
force_basic_auth: yes
url_username: "{{ user }}"
url_password: "{{ password }}"
follow_redirects: yes
status_code: [200, 204]
loop:
"{{ workflows }}"
- name: Cleanup target_path
file:
path: "{{ target.path }}"
state: absent
when: target is defined