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 | c3c78f6 | 2022-08-11 09:09:01 +0100 | [diff] [blame^] | 9 | kubectl_version: 1.23.7 |
efiacor | 50b8b44 | 2022-04-11 18:33:34 +0100 | [diff] [blame] | 10 | helm3_6_version: 3.6.3 |
efiacor | c3c78f6 | 2022-08-11 09:09:01 +0100 | [diff] [blame^] | 11 | helm3_8_version: 3.8.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 | a74e391 | 2022-04-19 10:09:40 +0100 | [diff] [blame] | 22 | - name: 'Install Helm3.6 {{helm3_6_version}}' |
Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 23 | block: |
efiacor | a74e391 | 2022-04-19 10:09:40 +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 | a74e391 | 2022-04-19 10:09:40 +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" |
efiacor | a74e391 | 2022-04-19 10:09:40 +0100 | [diff] [blame] | 31 | dest: /tmp/helm3.6 |
efiacor | 50b8b44 | 2022-04-11 18:33:34 +0100 | [diff] [blame] | 32 | - name: 'Unarchive Helm 3.6' |
Sylvain Desbureaux | 4784098 | 2021-02-09 08:21:21 +0100 | [diff] [blame] | 33 | unarchive: |
efiacor | a74e391 | 2022-04-19 10:09:40 +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' |
efiacor | a74e391 | 2022-04-19 10:09:40 +0100 | [diff] [blame] | 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 | a74e391 | 2022-04-19 10:09:40 +0100 | [diff] [blame] | 48 | echo "----> Installing helm3.6" |
efiacor | 50b8b44 | 2022-04-11 18:33:34 +0100 | [diff] [blame] | 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 | |
efiacor | c3c78f6 | 2022-08-11 09:09:01 +0100 | [diff] [blame^] | 55 | - name: 'Install Helm3.8 {{helm3_8_version}}' |
| 56 | block: |
| 57 | - name: 'Create directory /tmp/helm3.8' |
| 58 | file: |
| 59 | path: /tmp/helm3.8 |
| 60 | state: directory |
| 61 | - name: 'Fetch tar.gz for Helm 3.8' |
| 62 | get_url: |
| 63 | url: "https://get.helm.sh/helm-v{{helm3_8_version}}-linux-amd64.tar.gz" |
| 64 | dest: /tmp/helm3.8 |
| 65 | - name: 'Unarchive Helm 3.8' |
| 66 | unarchive: |
| 67 | src: "/tmp/helm3.8/helm-v{{helm3_8_version}}-linux-amd64.tar.gz" |
| 68 | dest: /tmp/helm3.8 |
| 69 | remote_src: true |
| 70 | become: yes |
| 71 | - name: 'Move Helm 3.8 bin to /usr/local/bin and set as executable' |
| 72 | command: 'mv /tmp/helm3.8/linux-amd64/helm /usr/local/bin/helm3.8' |
| 73 | become: yes |
| 74 | - name: 'Check Helm 3.8' |
| 75 | command: 'which helm3.8' |
| 76 | - name: 'Check kubectl {{kubectl_version}}' |
| 77 | command: 'which kubectl' |
| 78 | |
| 79 | - name: 'Install Helm 3.8' |
| 80 | shell: | |
| 81 | echo "----> Installing helm3.8" |
| 82 | wget 'https://get.helm.sh/helm-v{{helm3_8_version}}-linux-amd64.tar.gz' |
| 83 | tar -xvf 'https://get.helm.sh/helm-v{{helm3_8_version}}-linux-amd64.tar.gz' |
| 84 | mv linux-amd64/helm /usr/local/bin/helm3.8 |
| 85 | which helm3.8 |
| 86 | become: true |
| 87 | |
| 88 | |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 89 | - name: 'Install ChartMuseum {{chartmuseum_version}}' |
| 90 | block: |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 91 | - name: 'Fetch bin for ChartMuseum' |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 92 | get_url: |
| 93 | url: "https://s3.amazonaws.com/chartmuseum/release/v{{ chartmuseum_version }}/bin/linux/amd64/chartmuseum" |
| 94 | dest: /usr/local/bin/chartmuseum |
| 95 | mode: "0755" |
| 96 | become: yes |
Jessica Wagantall | c292c95 | 2021-02-16 11:46:11 -0800 | [diff] [blame] | 97 | - name: 'Check ChartMuseum {{chartmuseum_version}}' |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 98 | command: 'which chartmuseum' |