Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 1 | --- |
Bengt Thuree | 092ee88 | 2018-11-29 16:16:24 +1100 | [diff] [blame] | 2 | - import_playbook: ../common-packer/provision/docker.yaml |
Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 3 | |
| 4 | - hosts: all |
| 5 | become_user: root |
| 6 | become_method: sudo |
| 7 | |
| 8 | vars: |
efiacor | 50b8b44 | 2022-04-11 18:33:34 +0100 | [diff] [blame] | 9 | kubectl_version: 1.19.11 |
| 10 | helm3_6_version: 3.6.3 |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 11 | chartmuseum_version: 0.12.0 |
Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 12 | |
| 13 | tasks: |
| 14 | - name: 'Install kubectl {{kubectl_version}}' |
| 15 | get_url: |
Sylvain Desbureaux | 28a2ce6 | 2020-12-11 08:08:33 +0100 | [diff] [blame] | 16 | url: "https://storage.googleapis.com/kubernetes-release/release/v{{kubectl_version}}/bin/linux/amd64/kubectl" |
Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 17 | dest: /usr/local/bin/kubectl |
| 18 | mode: 0775 |
| 19 | become: yes |
| 20 | |
efiacor | a74e391 | 2022-04-19 10:09:40 +0100 | [diff] [blame] | 21 | - name: 'Install Helm3.6 {{helm3_6_version}}' |
Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 22 | block: |
efiacor | a74e391 | 2022-04-19 10:09:40 +0100 | [diff] [blame] | 23 | - name: 'Create directory /tmp/helm3.6' |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 24 | file: |
efiacor | a74e391 | 2022-04-19 10:09:40 +0100 | [diff] [blame] | 25 | path: /tmp/helm3.6 |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 26 | state: directory |
efiacor | 50b8b44 | 2022-04-11 18:33:34 +0100 | [diff] [blame] | 27 | - name: 'Fetch tar.gz for Helm 3.6' |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 28 | get_url: |
efiacor | 50b8b44 | 2022-04-11 18:33:34 +0100 | [diff] [blame] | 29 | url: "https://get.helm.sh/helm-v{{helm3_6_version}}-linux-amd64.tar.gz" |
efiacor | a74e391 | 2022-04-19 10:09:40 +0100 | [diff] [blame] | 30 | dest: /tmp/helm3.6 |
efiacor | 50b8b44 | 2022-04-11 18:33:34 +0100 | [diff] [blame] | 31 | - name: 'Unarchive Helm 3.6' |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 32 | unarchive: |
efiacor | a74e391 | 2022-04-19 10:09:40 +0100 | [diff] [blame] | 33 | src: "/tmp/helm3.6/helm-v{{helm3_6_version}}-linux-amd64.tar.gz" |
| 34 | dest: /tmp/helm3.6 |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 35 | remote_src: true |
| 36 | become: yes |
efiacor | 50b8b44 | 2022-04-11 18:33:34 +0100 | [diff] [blame] | 37 | - name: 'Move Helm 3.6 bin to /usr/local/bin and set as executable' |
efiacor | a74e391 | 2022-04-19 10:09:40 +0100 | [diff] [blame] | 38 | command: 'mv /tmp/helm3.6/linux-amd64/helm /usr/local/bin/helm3.6' |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 39 | become: yes |
efiacor | 50b8b44 | 2022-04-11 18:33:34 +0100 | [diff] [blame] | 40 | - name: 'Check Helm 3.6' |
| 41 | command: 'which helm3.6' |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 42 | - name: 'Check kubectl {{kubectl_version}}' |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 43 | command: 'which kubectl' |
| 44 | |
efiacor | 50b8b44 | 2022-04-11 18:33:34 +0100 | [diff] [blame] | 45 | - name: 'Install Helm 3.6' |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 46 | shell: | |
efiacor | a74e391 | 2022-04-19 10:09:40 +0100 | [diff] [blame] | 47 | echo "----> Installing helm3.6" |
efiacor | 50b8b44 | 2022-04-11 18:33:34 +0100 | [diff] [blame] | 48 | wget 'https://get.helm.sh/helm-v{{helm3_6_version}}-linux-amd64.tar.gz' |
| 49 | tar -xvf 'https://get.helm.sh/helm-v{{helm3_6_version}}-linux-amd64.tar.gz' |
| 50 | mv linux-amd64/helm /usr/local/bin/helm3.6 |
| 51 | which helm3.6 |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 52 | become: true |
| 53 | |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 54 | - name: 'Install ChartMuseum {{chartmuseum_version}}' |
| 55 | block: |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 56 | - name: 'Fetch bin for ChartMuseum' |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 57 | get_url: |
| 58 | url: "https://s3.amazonaws.com/chartmuseum/release/v{{ chartmuseum_version }}/bin/linux/amd64/chartmuseum" |
| 59 | dest: /usr/local/bin/chartmuseum |
| 60 | mode: "0755" |
| 61 | become: yes |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 62 | - name: 'Check ChartMuseum {{chartmuseum_version}}' |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 63 | command: 'which chartmuseum' |