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: |
| 17 | url: https://storage.googleapis.com/kubernetes-release/release/v{{kubectl_version}}/bin/linux/amd64/kubectl |
| 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" |
Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame] | 27 | dest: /tmp/helm-v{{helm_version}}-linux-amd64.tar.gz |
| 28 | - name: 'Unarchive' |
| 29 | unarchive: |
| 30 | src: /tmp/helm-v{{helm_version}}-linux-amd64.tar.gz |
| 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: |
| 48 | url: "http://storage.googleapis.com/kubernetes-helm/helm-v{{helm3_version}}-linux-amd64.tar.gz" |
| 49 | dest: /tmp/helm3/helm-v{{helm3_version}}-linux-amd64.tar.gz |
| 50 | - name: 'Unarchive' |
| 51 | unarchive: |
| 52 | src: /tmp/helm3/helm-v{{helm3_version}}-linux-amd64.tar.gz |
| 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 | |
| 64 | - name: 'Install ChartMuseum {{chartmuseum_version}}' |
| 65 | block: |
| 66 | - name: 'Fetch bin' |
| 67 | get_url: |
| 68 | url: "https://s3.amazonaws.com/chartmuseum/release/v{{ chartmuseum_version }}/bin/linux/amd64/chartmuseum" |
| 69 | dest: /usr/local/bin/chartmuseum |
| 70 | mode: "0755" |
| 71 | become: yes |
| 72 | - name: 'Check chartmuseum.' |
| 73 | command: 'which chartmuseum' |