temp dir is self generated

This commit is contained in:
Marco Lettere 2020-11-19 11:56:06 +01:00
parent 5d0c5567f0
commit 03d9b6c678
1 changed files with 13 additions and 0 deletions

View File

@ -1,4 +1,10 @@
---
- name: Create temporary build directory
tempfile:
state: directory
suffix: build
register: target_path
- name: Generate workflows
template:
src: "templates/{{ item }}.json.j2"
@ -15,3 +21,10 @@
status_code: [200, 204, 409]
loop:
"{{ workflows }}"
- name: Cleanup target_path
file:
path: "{{ target_path }}"
state: absent
when: target_path is defined