forked from elastisys/compliantkubernetes-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
get-requirements.yaml
87 lines (87 loc) · 2.98 KB
/
get-requirements.yaml
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
- name: Download compliantkubernetes-apps requirements
hosts: localhost
vars:
install_path: /usr/local/bin
install_user: "{{ lookup('env','USER') }}"
kubectl_version: 1.22.6
helm_version: 3.8.0
helmfile_version: 0.144.0
helmdiff_version: 3.1.2
helmsecrets_version: 3.12.0
jq_version: 1.6
s3cmd_version: 2.*
sops_version: 3.6.1
yq_version: 3.4.1
pwgen_version: 2.08*
apache2_utils_version: 2.4.*
connection: local
become: yes
become_user: root
tasks:
- name: Get curl
apt:
name: curl
- name: Get Kubectl
unarchive:
src: https://dl.k8s.io/v{{ kubectl_version }}/kubernetes-client-linux-amd64.tar.gz
dest: "{{ install_path }}"
remote_src: yes
extra_opts: [--strip-components=3]
- name: Get Helm
unarchive:
src: https://get.helm.sh/helm-v{{ helm_version }}-linux-amd64.tar.gz
dest: "{{ install_path }}"
mode: 0775
remote_src: yes
extra_opts:
- "--strip-components=1"
- "--no-wildcards"
- "--no-anchored"
- "helm"
- name: Get Helmfile
get_url:
url: https://github.com/roboll/helmfile/releases/download/v{{ helmfile_version }}/helmfile_linux_amd64
dest: "{{ install_path }}/helmfile"
mode: 0775
- name: Check if helm-diff plugin exists
stat:
path: "/home/{{ install_user }}/.local/share/helm/plugins/helm-diff"
register: helm_diff_exists
- name: Get helm-diff
become_user: "{{ install_user }}"
command: "helm plugin install https://github.com/databus23/helm-diff --version v{{ helmdiff_version }}"
register: "output"
when: not helm_diff_exists.stat.exists
- name: Check if helm-secrets plugin exists
stat:
path: "/home/{{ install_user }}/.local/share/helm/plugins/helm-secrets"
register: helm_secrets_exists
- name: Get helm-secrets
become_user: "{{ install_user }}"
command: "helm plugin install https://github.com/jkroepke/helm-secrets --version v{{ helmsecrets_version }}"
register: "output"
when: not helm_secrets_exists.stat.exists
- name: Get jq
get_url:
url: https://github.com/stedolan/jq/releases/download/jq-{{ jq_version }}/jq-linux64
dest: "{{ install_path }}/jq"
mode: 0775
- name: Get s3cmd
apt:
name: s3cmd={{ s3cmd_version }}
- name: Get sops
get_url:
url: https://github.com/mozilla/sops/releases/download/v{{ sops_version }}/sops-v{{ sops_version }}.linux
dest: "{{ install_path }}/sops"
mode: 0775
- name: Get yq
get_url:
url: https://github.com/mikefarah/yq/releases/download/{{ yq_version }}/yq_linux_amd64
dest: "{{ install_path }}/yq"
mode: 0775
- name: Get pwgen
apt:
name: pwgen={{ pwgen_version }}
- name: Get htpasswd (apache2-utils)
apt:
name: apache2-utils={{ apache2_utils_version }}