29 lines
917 B
YAML
29 lines
917 B
YAML
---
|
|
- hosts: all
|
|
tasks:
|
|
- name: Precreate directories
|
|
ansible.builtin.file:
|
|
path: "{{ openapi_dest }}/{{ zj_artifact.metadata.service_type }}"
|
|
state: "directory"
|
|
loop: "{{ zuul.artifacts }}"
|
|
loop_control:
|
|
loop_var: zj_artifact
|
|
when:
|
|
- "'metadata' in zj_artifact"
|
|
- "'type' in zj_artifact.metadata"
|
|
- "'service_type' in zj_artifact.metadata"
|
|
- "zj_artifact.metadata.type == 'openapi'"
|
|
|
|
- name: Download specs
|
|
ansible.builtin.uri:
|
|
url: "{{ zj_artifact.url }}"
|
|
dest: "{{ openapi_dest }}/{{ zj_artifact.metadata.service_type }}"
|
|
loop: "{{ zuul.artifacts }}"
|
|
loop_control:
|
|
loop_var: zj_artifact
|
|
when:
|
|
- "'metadata' in zj_artifact"
|
|
- "'type' in zj_artifact.metadata"
|
|
- "'service_type' in zj_artifact.metadata"
|
|
- "zj_artifact.metadata.type == 'openapi'"
|