blob: 1c7867196006adf5959ccd2784b5f706b74fd613 [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:
efiacor50b8b442022-04-11 18:33:34 +01009 kubectl_version: 1.19.11
10 helm3_6_version: 3.6.3
11 helm3_5_version: 3.5.2
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010012 chartmuseum_version: 0.12.0
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050013
14 tasks:
15 - name: 'Install kubectl {{kubectl_version}}'
16 get_url:
Sylvain Desbureaux28a2ce62020-12-11 08:08:33 +010017 url: "https://storage.googleapis.com/kubernetes-release/release/v{{kubectl_version}}/bin/linux/amd64/kubectl"
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050018 dest: /usr/local/bin/kubectl
19 mode: 0775
20 become: yes
21
efiacor50b8b442022-04-11 18:33:34 +010022 - name: 'Install Helm 3.6 {{helm3_6_version}}'
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050023 block:
efiacor50b8b442022-04-11 18:33:34 +010024 - name: 'Create directory /tmp/helm3_6'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010025 file:
efiacor50b8b442022-04-11 18:33:34 +010026 path: /tmp/helm3_6
Sylvain Desbureaux47840982021-02-09 08:21:21 +010027 state: directory
efiacor50b8b442022-04-11 18:33:34 +010028 - name: 'Fetch tar.gz for Helm 3.6'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010029 get_url:
efiacor50b8b442022-04-11 18:33:34 +010030 url: "https://get.helm.sh/helm-v{{helm3_6_version}}-linux-amd64.tar.gz"
31 dest: /tmp/helm3_6
32 - name: 'Unarchive Helm 3.6'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010033 unarchive:
efiacor50b8b442022-04-11 18:33:34 +010034 src: "/tmp/helm3_6/helm-v{{helm3_6_version}}-linux-amd64.tar.gz"
35 dest: /tmp/helm3_6
Sylvain Desbureaux47840982021-02-09 08:21:21 +010036 remote_src: true
37 become: yes
efiacor50b8b442022-04-11 18:33:34 +010038 - name: 'Move Helm 3.6 bin to /usr/local/bin and set as executable'
39 command: 'mv /tmp/helm3_6/linux-amd64/helm /usr/local/bin/helm3.6'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010040 become: yes
efiacor50b8b442022-04-11 18:33:34 +010041 - name: 'Check Helm 3.6'
42 command: 'which helm3.6'
Jessica Wagantallc292c952021-02-16 11:46:11 -080043 - name: 'Check kubectl {{kubectl_version}}'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010044 command: 'which kubectl'
45
efiacor50b8b442022-04-11 18:33:34 +010046 - name: 'Install Helm 3.6'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010047 shell: |
efiacor50b8b442022-04-11 18:33:34 +010048 echo "----> Installing helm 3.6"
49 wget 'https://get.helm.sh/helm-v{{helm3_6_version}}-linux-amd64.tar.gz'
50 tar -xvf 'https://get.helm.sh/helm-v{{helm3_6_version}}-linux-amd64.tar.gz'
51 mv linux-amd64/helm /usr/local/bin/helm3.6
52 which helm3.6
Sylvain Desbureaux47840982021-02-09 08:21:21 +010053 become: true
54
Sylvain Desbureaux8b56f762021-02-17 13:48:40 +010055 - name: 'Install Helm3.5 {{helm3_5_version}}'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010056 block:
Jessica Wagantallc292c952021-02-16 11:46:11 -080057 - name: 'Create directory /tmp/helm3.5'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010058 file:
Sylvain Desbureaux4ea69072021-02-15 16:05:20 +010059 path: /tmp/helm3.5
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010060 state: directory
Jessica Wagantallc292c952021-02-16 11:46:11 -080061 - name: 'Fetch tar.gz for Helm 3.5'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010062 get_url:
Sylvain Desbureaux8b56f762021-02-17 13:48:40 +010063 url: "https://get.helm.sh/helm-v{{helm3_5_version}}-linux-amd64.tar.gz"
Sylvain Desbureaux4ea69072021-02-15 16:05:20 +010064 dest: /tmp/helm3.5
Jessica Wagantallc292c952021-02-16 11:46:11 -080065 - name: 'Unarchive Helm 3.5'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010066 unarchive:
Sylvain Desbureaux8b56f762021-02-17 13:48:40 +010067 src: "/tmp/helm3.5/helm-v{{helm3_5_version}}-linux-amd64.tar.gz"
Sylvain Desbureaux4ea69072021-02-15 16:05:20 +010068 dest: /tmp/helm3.5
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010069 remote_src: true
70 become: yes
Jessica Wagantallc292c952021-02-16 11:46:11 -080071 - name: 'Move Helm 3.5 bin to /usr/local/bin and set as executable'
72 command: 'mv /tmp/helm3.5/linux-amd64/helm /usr/local/bin/helm3.5'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010073 become: yes
Jessica Wagantallc292c952021-02-16 11:46:11 -080074 - name: 'Check Helm 3.5'
Sylvain Desbureaux4ea69072021-02-15 16:05:20 +010075 command: 'which helm3.5'
Jessica Wagantallc292c952021-02-16 11:46:11 -080076 - name: 'Check kubectl {{kubectl_version}}'
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050077 command: 'which kubectl'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010078
Jessica Wagantallc292c952021-02-16 11:46:11 -080079 - name: 'Install Helm 3.5'
Jessica Wagantall9eaf79a2020-12-11 15:54:40 -080080 shell: |
Sylvain Desbureaux4ea69072021-02-15 16:05:20 +010081 echo "----> Installing helm3.5"
Sylvain Desbureaux8b56f762021-02-17 13:48:40 +010082 wget 'https://get.helm.sh/helm-v{{helm3_5_version}}-linux-amd64.tar.gz'
83 tar -xvf 'https://get.helm.sh/helm-v{{helm3_5_version}}-linux-amd64.tar.gz'
Sylvain Desbureaux4ea69072021-02-15 16:05:20 +010084 mv linux-amd64/helm /usr/local/bin/helm3.5
85 which helm3.5
Jessica Wagantall9eaf79a2020-12-11 15:54:40 -080086 become: true
87
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010088 - name: 'Install ChartMuseum {{chartmuseum_version}}'
89 block:
Jessica Wagantallc292c952021-02-16 11:46:11 -080090 - name: 'Fetch bin for ChartMuseum'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010091 get_url:
92 url: "https://s3.amazonaws.com/chartmuseum/release/v{{ chartmuseum_version }}/bin/linux/amd64/chartmuseum"
93 dest: /usr/local/bin/chartmuseum
94 mode: "0755"
95 become: yes
Jessica Wagantallc292c952021-02-16 11:46:11 -080096 - name: 'Check ChartMuseum {{chartmuseum_version}}'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010097 command: 'which chartmuseum'