-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtools.yml
184 lines (161 loc) · 7.36 KB
/
tools.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
- name: "Setup Tools"
hosts: all
vars_files:
- vars.yml
vars:
bin_dir: "{{ work_dir }}/bin"
# only needed to download the tools
argocd_version: 2.1.6
gitea_version: 1.15.6
tkn_cli_version: 0.21.0
kustomize_version: 4.4.1
tasks:
- name: "Ensure bin directory"
ansible.builtin.file:
state: directory
path: "{{ bin_dir }}"
- name: "Download argocd cli(macOS)"
ansible.builtin.get_url:
url: "https://github.com/argoproj/argo-cd/releases/download/v{{ argocd_version }}/argocd-darwin-amd64"
dest: "{{ bin_dir }}/argocd"
mode: '0755'
timeout: 30
when: ansible_os_family == 'Darwin'
- name: "Download argocd cli(linux)"
ansible.builtin.get_url:
url: "https://github.com/argoproj/argo-cd/releases/download/v{{ argocd_version }}/argocd-linux-amd64"
dest: "{{ bin_dir }}/argocd"
mode: '0755'
timeout: 30
when: ansible_os_family == 'RedHat' or ansible_os_family == 'RedHat'
- name: "Download age (macOS)"
ansible.builtin.get_url:
url: "https://dl.filippo.io/age/latest?for=darwin/amd64"
dest: "{{ work_dir }}/age-amd64.tar.gz"
timeout: 30
when: ansible_os_family == 'Darwin'
- name: "Download age (linux)"
ansible.builtin.get_url:
url: "https://dl.filippo.io/age/latest?for=linux/amd64"
dest: "{{ work_dir }}/age-amd64.tar.gz"
timeout: 30
when: ansible_os_family == 'RedHat' or ansible_os_family == 'Debian'
- name: "Install age"
ansible.builtin.unarchive:
src: "{{ work_dir }}/age-amd64.tar.gz"
dest: "{{ bin_dir }}"
extra_opts:
- "--strip-components=1"
- "--exclude=README.md"
- "--exclude=LICENSE"
- name: "Download gitea (macOS)"
ansible.builtin.get_url:
url: "https://dl.gitea.io/gitea/{{ gitea_version }}/gitea-{{ gitea_version }}-darwin-10.12-amd64"
checksum: "sha256:https://dl.gitea.io/gitea/{{ gitea_version }}/gitea-{{ gitea_version }}-darwin-10.12-amd64.sha256"
dest: "{{ bin_dir }}/gitea"
mode: "0755"
timeout: 30
when: ansible_os_family == 'Darwin'
- name: "Download gitea (linux)"
ansible.builtin.get_url:
url: "https://dl.gitea.io/gitea/{{ gitea_version }}/gitea-{{ gitea_version }}-linux-amd64"
checksum: "sha256:https://dl.gitea.io/gitea/{{ gitea_version }}/gitea-{{ gitea_version }}-linux-amd64.sha256"
dest: "{{ bin_dir }}/gitea"
mode: "0755"
when: ansible_os_family == 'RedHat' or ansible_os_family == 'Debian'
- name: "Download Helm (macOS)"
ansible.builtin.get_url:
url: "https://get.helm.sh/helm-v{{ helm_version }}-darwin-amd64.tar.gz"
dest: "{{ work_dir }}/helm-v{{ helm_version }}-amd64.tar.gz"
checksum: "sha256:https://get.helm.sh/helm-v{{ helm_version}}-darwin-amd64.tar.gz.sha256sum"
timeout: 30
when: ansible_os_family == 'Darwin'
- name: "Download Helm (linux) "
ansible.builtin.get_url:
url: "https://get.helm.sh/helm-v{{ helm_version }}-linux-amd64.tar.gz"
dest: "{{ work_dir }}/helm-v{{ helm_version }}-amd64.tar.gz"
checksum: "sha256:https://get.helm.sh/helm-v{{ helm_version }}-darwin-amd64.tar.gz.sha256sum.asc"
timeout: 30
when: ansible_os_family == 'RedHat' or ansible_os_family == 'Debian'
- name: "Install Helm"
ansible.builtin.unarchive:
src: "{{ work_dir }}/helm-v{{ helm_version }}-amd64.tar.gz"
dest: "{{ bin_dir }}"
extra_opts:
- "--strip-components=1"
- "--exclude=README.md"
- "--exclude=LICENSE"
- name: "Ensure Helm Diff plugin is installed"
kubernetes.core.helm_plugin:
plugin_path: https://github.com/databus23/helm-diff
state: present
context: mgmt
- name: "Ensure Helm Secrets plugin is installed"
kubernetes.core.helm_plugin:
plugin_path: https://github.com/jkroepke/helm-secrets
state: present
context: mgmt
- name: "Download kubectl(macOS)"
ansible.builtin.get_url:
url: "https://dl.k8s.io/release/v{{ kubectl_version }}/bin/darwin/amd64/kubectl"
dest: "{{ bin_dir }}/kubectl"
timeout: 30
mode: '0755'
when: ansible_os_family == 'Darwin'
- name: "Download kubectl(macOS)"
ansible.builtin.get_url:
url: "https://dl.k8s.io/release/v{{ kubectl_version }}/bin/linux/amd64/kubectl"
dest: "{{ bin_dir }}"
mode: '0755'
timeout: 30
when: ansible_os_family == 'RedHat' or ansible_os_family == 'RedHat'
- name: "Download kustomize (macOS)"
ansible.builtin.get_url:
url: "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv4.4.1/kustomize_v{{ kustomize_version }}_darwin_amd64.tar.gz"
dest: "{{ work_dir }}/kustomize-amd64.tar.gz"
checksum: "sha256:https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv{{ kustomize_version }}/checksums.txt"
timeout: 30
when: ansible_os_family == 'Darwin'
- name: "Download kustomize (linux) "
ansible.builtin.get_url:
url: "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv{{ kustomize_version }}/kustomize_v{{ kustomize_version }}_linux_amd64.tar.gz"
dest: "{{ work_dir }}/kustomize-amd64.tar.gz"
checksum: "sha256:https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv{{ kustomize_version }}/checksums.txt"
timeout: 30
when: ansible_os_family == 'RedHat' or ansible_os_family == 'Debian'
- name: "Install kustomize"
ansible.builtin.unarchive:
src: "{{ work_dir }}/kustomize-amd64.tar.gz"
dest: "{{ bin_dir }}"
extra_opts:
- "--strip-components=1"
- "--exclude=README.md"
- "--exclude=LICENSE"
- name: "Download sops (macOS)"
ansible.builtin.get_url:
url: "https://github.com/mozilla/sops/releases/download/v{{ sops_version }}/sops-v{{ sops_version }}.darwin"
dest: "{{ bin_dir }}/sops"
mode: '0755'
timeout: 30
when: ansible_os_family == 'Darwin'
- name: "Download sops (linux)"
ansible.builtin.get_url:
url: "https://github.com/mozilla/sops/releases/download/v{{ sops_version }}/sops-v{{ sops_version }}.linux"
dest: "{{ bin_dir }}/sops"
mode: '0755'
timeout: 30
when: ansible_os_family == 'RedHat' or ansible_os_family == 'Debian'
- name: "Download tektoncd-cli (macOS)"
ansible.builtin.get_url:
url: "https://github.com/tektoncd/cli/releases/download/v{{ tkn_cli_version }}/tkn_{{ tkn_cli_version }}_Linux_x86_64.tar.gz"
checksum: "sha256:https://github.com/tektoncd/cli/releases/download/v{{ tkn_cli_version }}/checksums.txt"
dest: "{{ work_dir }}/clusteradm-amd64.tar.gz"
timeout: 30
when: ansible_os_family == 'Darwin'
- name: "Download tektoncd-cli (linux) "
ansible.builtin.get_url:
url: "https://github.com/tektoncd/cli/releases/download/v{{ tkn_cli_version }}/tkn_{{ tkn_cli_version }}_Darwin_x86_64.tar.gz"
checksum: "sha256:https://github.com/tektoncd/cli/releases/download/v{{ tkn_cli_version }}/checksums.txt"
dest: "{{ work_dir }}/clusteradm-amd64.tar.gz"
timeout: 30
when: ansible_os_family == 'RedHat' or ansible_os_family == 'Debian'