blob: 4ccbecd6372e07b7e438b0af3a8ae680da21f14d [file] [log] [blame]
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -05001---
Bengt Thuree092ee882018-11-29 16:16:24 +11002- import_playbook: ../common-packer/provision/docker.yaml
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -05003
4- hosts: all
5 become_user: root
6 become_method: sudo
7
8 vars:
efiacorf165f312022-11-10 09:45:50 +00009 kubectl_version: 1.23.8
efiacorc3c78f62022-08-11 09:09:01 +010010 helm3_8_version: 3.8.2
Jessica Wagantall4a9ebfc2023-03-29 12:13:46 -070011 chartmuseum_version: 0.15.0
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050012
13 tasks:
Andrew Grimberga6b750c2023-05-03 08:47:44 -070014 - name: "Install kubectl {{kubectl_version}}"
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050015 get_url:
Sylvain Desbureaux28a2ce62020-12-11 08:08:33 +010016 url: "https://storage.googleapis.com/kubernetes-release/release/v{{kubectl_version}}/bin/linux/amd64/kubectl"
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050017 dest: /usr/local/bin/kubectl
18 mode: 0775
Andrew Grimberga6b750c2023-05-03 08:47:44 -070019 become: true
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050020
Andrew Grimberga6b750c2023-05-03 08:47:44 -070021 - name: "Install Helm3.8 {{helm3_8_version}}"
efiacorc3c78f62022-08-11 09:09:01 +010022 block:
Andrew Grimberga6b750c2023-05-03 08:47:44 -070023 - name: "Create directory /tmp/helm3.8"
efiacorc3c78f62022-08-11 09:09:01 +010024 file:
25 path: /tmp/helm3.8
26 state: directory
Andrew Grimberga6b750c2023-05-03 08:47:44 -070027 - name: "Fetch tar.gz for Helm 3.8"
efiacorc3c78f62022-08-11 09:09:01 +010028 get_url:
29 url: "https://get.helm.sh/helm-v{{helm3_8_version}}-linux-amd64.tar.gz"
30 dest: /tmp/helm3.8
Andrew Grimberga6b750c2023-05-03 08:47:44 -070031 - name: "Unarchive Helm 3.8"
efiacorc3c78f62022-08-11 09:09:01 +010032 unarchive:
33 src: "/tmp/helm3.8/helm-v{{helm3_8_version}}-linux-amd64.tar.gz"
34 dest: /tmp/helm3.8
35 remote_src: true
Andrew Grimberga6b750c2023-05-03 08:47:44 -070036 become: true
37 - name: "Move Helm 3.8 bin to /usr/local/bin and set as executable"
38 command: "mv /tmp/helm3.8/linux-amd64/helm /usr/local/bin/helm3.8"
39 become: true
40 - name: "Check Helm 3.8"
41 command: "which helm3.8"
42 - name: "Check kubectl {{kubectl_version}}"
43 command: "which kubectl"
efiacorc3c78f62022-08-11 09:09:01 +010044
Andrew Grimberga6b750c2023-05-03 08:47:44 -070045 - name: "Install Helm 3.8"
efiacorc3c78f62022-08-11 09:09:01 +010046 shell: |
Andrew Grimberga6b750c2023-05-03 08:47:44 -070047 echo "----> Installing helm3.8"
48 wget 'https://get.helm.sh/helm-v{{helm3_8_version}}-linux-amd64.tar.gz'
49 tar -xvf 'https://get.helm.sh/helm-v{{helm3_8_version}}-linux-amd64.tar.gz'
50 mv linux-amd64/helm /usr/local/bin/helm3.8
51 which helm3.8
efiacorc3c78f62022-08-11 09:09:01 +010052 become: true
53
Andrew Grimberga6b750c2023-05-03 08:47:44 -070054 - name: "Install ChartMuseum {{chartmuseum_version}}"
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010055 block:
Andrew Grimberga6b750c2023-05-03 08:47:44 -070056 - name: "Create directory /tmp/chartmuseum"
Jessica Wagantall8fba1852023-03-29 13:19:30 -070057 file:
58 path: /tmp/chartmuseum
59 state: directory
Andrew Grimberga6b750c2023-05-03 08:47:44 -070060 - name: "Fetch tar.gz for chartmuseum"
Jessica Wagantall8fba1852023-03-29 13:19:30 -070061 get_url:
62 url: "https://get.helm.sh/chartmuseum-v{{chartmuseum_version}}-linux-amd64.tar.gz"
63 dest: /tmp/chartmuseum
Andrew Grimberga6b750c2023-05-03 08:47:44 -070064 - name: "Unarchive chartmuseum"
Jessica Wagantall4a9ebfc2023-03-29 12:13:46 -070065 unarchive:
Jessica Wagantall8fba1852023-03-29 13:19:30 -070066 src: "/tmp/chartmuseum/chartmuseum-v{{chartmuseum_version}}-linux-amd64.tar.gz"
67 dest: /tmp/chartmuseum
68 remote_src: true
Andrew Grimberga6b750c2023-05-03 08:47:44 -070069 become: true
70 - name: "Move chartmuseum bin to /usr/local/bin and set as executable"
71 command: "mv /tmp/chartmuseum/linux-amd64/chartmuseum /usr/local/bin/chartmuseum"
72 become: true
73 - name: "Check ChartMuseum {{chartmuseum_version}}"
74 command: "which chartmuseum"