-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Paul Belanger <[email protected]>
- Loading branch information
1 parent
f8a749e
commit 26cc2ac
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
playbooks/roles/download-ansible-collections/tasks/main.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
- name: create dir | ||
file: | ||
path: "{{ download_artifact_directory }}" | ||
state: directory | ||
|
||
- name: Download archive by type | ||
uri: | ||
url: "{{ artifact.url }}" | ||
dest: "{{ download_artifact_directory }}" | ||
loop: "{{ zuul.artifacts }}" | ||
loop_control: | ||
loop_var: artifact | ||
when: "'metadata' in artifact and 'type' in artifact.metadata and (artifact.metadata.type == download_artifact_type or ((download_artifact_type | type_debug) == 'list' and artifact.metadata.type in download_artifact_type))" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- hosts: all | ||
tasks: | ||
- name: download ansible collections | ||
include_role: | ||
name: download-artifact |