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 | f165f31 | 2022-11-10 09:45:50 +0000 | [diff] [blame] | 9 | kubectl_version: 1.23.8 |
efiacor | c3c78f6 | 2022-08-11 09:09:01 +0100 | [diff] [blame] | 10 | helm3_8_version: 3.8.2 |
Jessica Wagantall | 4a9ebfc | 2023-03-29 12:13:46 -0700 | [diff] [blame] | 11 | chartmuseum_version: 0.15.0 |
Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 12 | |
| 13 | tasks: |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 14 | - name: "Install kubectl {{kubectl_version}}" |
Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 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 |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 19 | become: true |
Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 20 | |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 21 | - name: "Install Helm3.8 {{helm3_8_version}}" |
efiacor | c3c78f6 | 2022-08-11 09:09:01 +0100 | [diff] [blame] | 22 | block: |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 23 | - name: "Create directory /tmp/helm3.8" |
efiacor | c3c78f6 | 2022-08-11 09:09:01 +0100 | [diff] [blame] | 24 | file: |
| 25 | path: /tmp/helm3.8 |
| 26 | state: directory |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 27 | - name: "Fetch tar.gz for Helm 3.8" |
efiacor | c3c78f6 | 2022-08-11 09:09:01 +0100 | [diff] [blame] | 28 | get_url: |
| 29 | url: "https://get.helm.sh/helm-v{{helm3_8_version}}-linux-amd64.tar.gz" |
| 30 | dest: /tmp/helm3.8 |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 31 | - name: "Unarchive Helm 3.8" |
efiacor | c3c78f6 | 2022-08-11 09:09:01 +0100 | [diff] [blame] | 32 | 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 Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 36 | 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" |
efiacor | c3c78f6 | 2022-08-11 09:09:01 +0100 | [diff] [blame] | 44 | |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 45 | - name: "Install Helm 3.8" |
efiacor | c3c78f6 | 2022-08-11 09:09:01 +0100 | [diff] [blame] | 46 | shell: | |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 47 | 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 |
efiacor | c3c78f6 | 2022-08-11 09:09:01 +0100 | [diff] [blame] | 52 | become: true |
| 53 | |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 54 | - name: "Install ChartMuseum {{chartmuseum_version}}" |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 55 | block: |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 56 | - name: "Create directory /tmp/chartmuseum" |
Jessica Wagantall | 8fba185 | 2023-03-29 13:19:30 -0700 | [diff] [blame] | 57 | file: |
| 58 | path: /tmp/chartmuseum |
| 59 | state: directory |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 60 | - name: "Fetch tar.gz for chartmuseum" |
Jessica Wagantall | 8fba185 | 2023-03-29 13:19:30 -0700 | [diff] [blame] | 61 | get_url: |
| 62 | url: "https://get.helm.sh/chartmuseum-v{{chartmuseum_version}}-linux-amd64.tar.gz" |
| 63 | dest: /tmp/chartmuseum |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 64 | - name: "Unarchive chartmuseum" |
Jessica Wagantall | 4a9ebfc | 2023-03-29 12:13:46 -0700 | [diff] [blame] | 65 | unarchive: |
Jessica Wagantall | 8fba185 | 2023-03-29 13:19:30 -0700 | [diff] [blame] | 66 | src: "/tmp/chartmuseum/chartmuseum-v{{chartmuseum_version}}-linux-amd64.tar.gz" |
| 67 | dest: /tmp/chartmuseum |
| 68 | remote_src: true |
Andrew Grimberg | a6b750c | 2023-05-03 08:47:44 -0700 | [diff] [blame] | 69 | 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" |