ansible-role-workflows-common/tasks/main.yaml

27 lines
566 B
YAML
Raw Normal View History

2020-11-18 17:46:04 +01:00
---
2020-11-19 11:54:11 +01:00
- name: Create temporary build directory
tempfile:
state: directory
suffix: build
2020-11-19 12:16:50 +01:00
register: target
2020-11-19 11:54:11 +01:00
2020-11-18 17:46:04 +01:00
- name: Generate taskdefs
template:
src: "templates/taskdefs.json.j2"
2020-11-19 12:16:50 +01:00
dest: "{{ target.path }}/taskdefs.json"
2020-11-18 17:46:04 +01:00
- name: Upload task definitions
uri:
url: "{{ conductor_taskdef_endpoint }}"
method: POST
2020-11-19 12:16:50 +01:00
src: "{{ target.path }}/taskdefs.json"
2020-11-18 17:46:04 +01:00
body_format: json
status_code: 204
follow_redirects: yes
2020-11-19 11:54:11 +01:00
2020-11-19 12:16:50 +01:00
- name: Cleanup temporary target
2020-11-19 11:54:11 +01:00
file:
2020-11-19 12:16:50 +01:00
path: "{{ target.path }}"
2020-11-19 11:54:11 +01:00
state: absent
2020-11-19 12:16:50 +01:00
when: target is defined