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 |
| 11 | helm3_5_version: 3.5.2 |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 12 | chartmuseum_version: 0.12.0 |
Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 13 | |
| 14 | tasks: |
| 15 | - name: 'Install kubectl {{kubectl_version}}' |
| 16 | get_url: |
Sylvain Desbureaux | 28a2ce6 | 2020-12-11 08:08:33 +0100 | [diff] [blame] | 17 | 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] | 18 | dest: /usr/local/bin/kubectl |
| 19 | mode: 0775 |
| 20 | become: yes |
| 21 | |
efiacor | 50b8b44 | 2022-04-11 18:33:34 +0100 | [diff] [blame] | 22 | - name: 'Install Helm 3.6 {{helm3_6_version}}' |
Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 23 | block: |
efiacor | 50b8b44 | 2022-04-11 18:33:34 +0100 | [diff] [blame] | 24 | - name: 'Create directory /tmp/helm3_6' |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 25 | file: |
efiacor | 50b8b44 | 2022-04-11 18:33:34 +0100 | [diff] [blame] | 26 | path: /tmp/helm3_6 |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 27 | state: directory |
efiacor | 50b8b44 | 2022-04-11 18:33:34 +0100 | [diff] [blame] | 28 | - name: 'Fetch tar.gz for Helm 3.6' |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 29 | get_url: |
efiacor | 50b8b44 | 2022-04-11 18:33:34 +0100 | [diff] [blame] | 30 | 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 Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 33 | unarchive: |
efiacor | 50b8b44 | 2022-04-11 18:33:34 +0100 | [diff] [blame] | 34 | src: "/tmp/helm3_6/helm-v{{helm3_6_version}}-linux-amd64.tar.gz" |
| 35 | dest: /tmp/helm3_6 |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 36 | remote_src: true |
| 37 | become: yes |
efiacor | 50b8b44 | 2022-04-11 18:33:34 +0100 | [diff] [blame] | 38 | - 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 Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 40 | become: yes |
efiacor | 50b8b44 | 2022-04-11 18:33:34 +0100 | [diff] [blame] | 41 | - name: 'Check Helm 3.6' |
| 42 | command: 'which helm3.6' |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 43 | - name: 'Check kubectl {{kubectl_version}}' |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 44 | command: 'which kubectl' |
| 45 | |
efiacor | 50b8b44 | 2022-04-11 18:33:34 +0100 | [diff] [blame] | 46 | - name: 'Install Helm 3.6' |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 47 | shell: | |
efiacor | 50b8b44 | 2022-04-11 18:33:34 +0100 | [diff] [blame] | 48 | 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 Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 53 | become: true |
| 54 | |
Sylvain Desbureaux | 8b56f76 | 2021-02-17 13:48:40 +0100 | [diff] [blame] | 55 | - name: 'Install Helm3.5 {{helm3_5_version}}' |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 56 | block: |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 57 | - name: 'Create directory /tmp/helm3.5' |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 58 | file: |
Sylvain Desbureaux | 4ea6907 | 2021-02-15 16:05:20 +0100 | [diff] [blame] | 59 | path: /tmp/helm3.5 |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 60 | state: directory |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 61 | - name: 'Fetch tar.gz for Helm 3.5' |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 62 | get_url: |
Sylvain Desbureaux | 8b56f76 | 2021-02-17 13:48:40 +0100 | [diff] [blame] | 63 | url: "https://get.helm.sh/helm-v{{helm3_5_version}}-linux-amd64.tar.gz" |
Sylvain Desbureaux | 4ea6907 | 2021-02-15 16:05:20 +0100 | [diff] [blame] | 64 | dest: /tmp/helm3.5 |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 65 | - name: 'Unarchive Helm 3.5' |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 66 | unarchive: |
Sylvain Desbureaux | 8b56f76 | 2021-02-17 13:48:40 +0100 | [diff] [blame] | 67 | src: "/tmp/helm3.5/helm-v{{helm3_5_version}}-linux-amd64.tar.gz" |
Sylvain Desbureaux | 4ea6907 | 2021-02-15 16:05:20 +0100 | [diff] [blame] | 68 | dest: /tmp/helm3.5 |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 69 | remote_src: true |
| 70 | become: yes |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 71 | - 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 Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 73 | become: yes |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 74 | - name: 'Check Helm 3.5' |
Sylvain Desbureaux | 4ea6907 | 2021-02-15 16:05:20 +0100 | [diff] [blame] | 75 | command: 'which helm3.5' |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 76 | - name: 'Check kubectl {{kubectl_version}}' |
Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 77 | command: 'which kubectl' |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 78 | |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 79 | - name: 'Install Helm 3.5' |
Jessica Wagantall | 9eaf79a | 2020-12-11 15:54:40 -0800 | [diff] [blame] | 80 | shell: | |
Sylvain Desbureaux | 4ea6907 | 2021-02-15 16:05:20 +0100 | [diff] [blame] | 81 | echo "----> Installing helm3.5" |
Sylvain Desbureaux | 8b56f76 | 2021-02-17 13:48:40 +0100 | [diff] [blame] | 82 | 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 Desbureaux | 4ea6907 | 2021-02-15 16:05:20 +0100 | [diff] [blame] | 84 | mv linux-amd64/helm /usr/local/bin/helm3.5 |
| 85 | which helm3.5 |
Jessica Wagantall | 9eaf79a | 2020-12-11 15:54:40 -0800 | [diff] [blame] | 86 | become: true |
| 87 | |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 88 | - name: 'Install ChartMuseum {{chartmuseum_version}}' |
| 89 | block: |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 90 | - name: 'Fetch bin for ChartMuseum' |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 91 | 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 Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 96 | - name: 'Check ChartMuseum {{chartmuseum_version}}' |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 97 | command: 'which chartmuseum' |