fixed tempdir

This commit is contained in:
Marco Lettere 2020-11-19 12:14:55 +01:00
parent 03d9b6c678
commit 476fd503d2
1 changed files with 6 additions and 6 deletions

View File

@ -3,28 +3,28 @@
tempfile:
state: directory
suffix: build
register: target_path
register: target
- name: Generate workflows
template:
src: "templates/{{ item }}.json.j2"
dest: "{{ target_path }}{{ item }}.json"
dest: "{{ target.path }}/{{ item }}.json"
loop: "{{ workflows }}"
- name: Upload workflows
uri:
url: "{{ conductor_workflowdef_endpoint }}"
method: POST
src: "{{ target_path }}{{ item }}.json"
src: "{{ target.path }}/{{ item }}.json"
body_format: json
follow_redirects: yes
status_code: [200, 204, 409]
status_code: [200, 204, 409, 500]
loop:
"{{ workflows }}"
- name: Cleanup target_path
file:
path: "{{ target_path }}"
path: "{{ target.path }}"
state: absent
when: target_path is defined
when: target is defined