-
Notifications
You must be signed in to change notification settings - Fork 166
/
artifacts-download.yml
55 lines (52 loc) · 2.06 KB
/
artifacts-download.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
- hosts: local
become: yes
vars_files:
- "{{inventory_dir}}/secrets.yml"
tasks:
- name: download artifact from azure storage
include_role:
name: azure-cloud-storage
tasks_from: blob-download.yml
vars:
blob_container_name: "{{ cloud_storage_artifacts_bucketname }}"
blob_file_name: "{{ artifact }}"
local_file_or_folder_path: "{{ artifact_path }}"
storage_account_name: "{{ cloud_artifact_storage_accountname }}"
storage_account_key: "{{ cloud_artifact_storage_secret }}"
when: cloud_service_provider == "azure"
- name: download artifact from gcloud storage
include_role:
name: gcp-cloud-storage
tasks_from: download.yml
vars:
gcp_storage_service_account_name: "{{ cloud_artifact_storage_accountname }}"
gcp_storage_key_file: "{{ cloud_artifact_storage_secret }}"
gcp_bucket_name: "{{ cloud_storage_artifacts_bucketname }}"
gcp_path: "{{ artifact }}"
local_file_or_folder_path: "{{ artifact_path }}"
when: cloud_service_provider == "gcloud"
- name: download artifact from aws s3
include_role:
name: aws-cloud-storage
tasks_from: download.yml
vars:
local_file_or_folder_path: "{{ artifact_path }}"
s3_bucket_name: "{{ cloud_storage_artifacts_bucketname }}"
s3_path: "{{ artifact }}"
aws_default_region: "{{ cloud_public_storage_region }}"
aws_access_key_id: "{{ cloud_artifact_storage_accountname }}"
aws_secret_access_key: "{{ cloud_artifact_storage_secret }}"
when: cloud_service_provider == "aws"
- name: download artifact from oci oss storage
include_role:
name: oci-cloud-storage
apply:
environment:
OCI_CLI_AUTH: "instance_principal"
tasks_from: download.yml
vars:
oss_bucket_name: "{{ cloud_storage_artifacts_bucketname }}"
oss_object_name: "{{ artifact }}"
local_file_or_folder_path: "{{ artifact_path }}"
when: cloud_service_provider == "oci"