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