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: |
Anil Belur | b570b51 | 2020-05-07 09:06:25 +1000 | [diff] [blame] | 9 | kubectl_version: 1.15.11 |
Anil Belur | 1a87cf5 | 2020-05-06 10:22:21 +1000 | [diff] [blame] | 10 | helm_version: 2.16.6 |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 11 | helm3_version: 3.3.4 |
| 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 | |
| 22 | - name: 'Install Helm {{helm_version}}' |
| 23 | block: |
| 24 | - name: 'Fetch tar.gz' |
| 25 | get_url: |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 26 | url: "http://storage.googleapis.com/kubernetes-helm/helm-v{{helm_version}}-linux-amd64.tar.gz" |
Sylvain Desbureaux | 28a2ce6 | 2020-12-11 08:08:33 +0100 | [diff] [blame] | 27 | dest: "/tmp/helm-v{{helm_version}}-linux-amd64.tar.gz" |
Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 28 | - name: 'Unarchive' |
| 29 | unarchive: |
Sylvain Desbureaux | 28a2ce6 | 2020-12-11 08:08:33 +0100 | [diff] [blame] | 30 | src: "/tmp/helm-v{{helm_version}}-linux-amd64.tar.gz" |
Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 31 | dest: /tmp |
| 32 | remote_src: true |
| 33 | become: yes |
| 34 | - name: 'Move helm to /usr/local/bin and set as executable' |
| 35 | command: 'mv /tmp/linux-amd64/helm /usr/local/bin/helm' |
| 36 | become: yes |
| 37 | - name: 'Check helm.' |
| 38 | command: 'which helm' |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 39 | |
| 40 | - name: 'Install Helm3 {{helm3_version}}' |
| 41 | block: |
| 42 | - name: create directory |
| 43 | file: |
| 44 | path: /tmp/helm3 |
| 45 | state: directory |
| 46 | - name: 'Fetch tar.gz' |
| 47 | get_url: |
Jessica Wagantall | 3942f38 | 2020-12-11 13:47:32 -0800 | [diff] [blame] | 48 | url: "https://get.helm.sh/helm-v{{helm3_version}}-linux-amd64.tar.gz" |
Jessica Wagantall | 9eaf79a | 2020-12-11 15:54:40 -0800 | [diff] [blame] | 49 | dest: /tmp/helm3 |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 50 | - name: 'Unarchive' |
| 51 | unarchive: |
Sylvain Desbureaux | 28a2ce6 | 2020-12-11 08:08:33 +0100 | [diff] [blame] | 52 | src: "/tmp/helm3/helm-v{{helm3_version}}-linux-amd64.tar.gz" |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 53 | dest: /tmp/helm3 |
| 54 | remote_src: true |
| 55 | become: yes |
| 56 | - name: 'Move helm to /usr/local/bin and set as executable' |
| 57 | command: 'mv /tmp/helm3/linux-amd64/helm /usr/local/bin/helm3' |
| 58 | become: yes |
| 59 | - name: 'Check helm3.' |
| 60 | command: 'which helm3' |
Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 61 | - name: 'Check kubectl.' |
| 62 | command: 'which kubectl' |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 63 | |
Jessica Wagantall | 9eaf79a | 2020-12-11 15:54:40 -0800 | [diff] [blame] | 64 | - name: Install helm3 |
| 65 | shell: | |
| 66 | echo "----> Installing helm3" |
| 67 | wget 'https://get.helm.sh/helm-v3.3.4-linux-amd64.tar.gz' |
| 68 | tar -xvf 'https://get.helm.sh/helm-v3.3.4-linux-amd64.tar.gz' |
| 69 | mv linux-amd64/helm /usr/local/bin/helm3 |
| 70 | which helm3 |
| 71 | become: true |
| 72 | |
Sylvain Desbureaux | 5657eda | 2020-11-26 10:25:39 +0100 | [diff] [blame] | 73 | - name: 'Install ChartMuseum {{chartmuseum_version}}' |
| 74 | block: |
| 75 | - name: 'Fetch bin' |
| 76 | get_url: |
| 77 | url: "https://s3.amazonaws.com/chartmuseum/release/v{{ chartmuseum_version }}/bin/linux/amd64/chartmuseum" |
| 78 | dest: /usr/local/bin/chartmuseum |
| 79 | mode: "0755" |
| 80 | become: yes |
| 81 | - name: 'Check chartmuseum.' |
| 82 | command: 'which chartmuseum' |