Jeremy Phelps | f7d8c95 | 2018-04-17 09:23:15 -0500 | [diff] [blame^] | 1 | --- |
| 2 | - import_playbook: ../common-packer/provision/baseline.yaml |
| 3 | |
| 4 | - hosts: all |
| 5 | become_user: root |
| 6 | become_method: sudo |
| 7 | |
| 8 | vars: |
| 9 | kubectl_version: 1.8.6 |
| 10 | helm_version: 2.6.1 |
| 11 | |
| 12 | tasks: |
| 13 | - name: 'Install kubectl {{kubectl_version}}' |
| 14 | get_url: |
| 15 | url: https://storage.googleapis.com/kubernetes-release/release/v{{kubectl_version}}/bin/linux/amd64/kubectl |
| 16 | dest: /usr/local/bin/kubectl |
| 17 | mode: 0775 |
| 18 | become: yes |
| 19 | |
| 20 | - name: 'Install Helm {{helm_version}}' |
| 21 | block: |
| 22 | - name: 'Fetch tar.gz' |
| 23 | get_url: |
| 24 | url: http://storage.googleapis.com/kubernetes-helm/helm-v{{helm_version}}-linux-amd64.tar.gz |
| 25 | dest: /tmp/helm-v{{helm_version}}-linux-amd64.tar.gz |
| 26 | - name: 'Unarchive' |
| 27 | unarchive: |
| 28 | src: /tmp/helm-v{{helm_version}}-linux-amd64.tar.gz |
| 29 | dest: /tmp |
| 30 | remote_src: true |
| 31 | become: yes |
| 32 | - name: 'Move helm to /usr/local/bin and set as executable' |
| 33 | command: 'mv /tmp/linux-amd64/helm /usr/local/bin/helm' |
| 34 | become: yes |
| 35 | - name: 'Check helm.' |
| 36 | command: 'which helm' |
| 37 | - name: 'Check kubectl.' |
| 38 | command: 'which kubectl' |
| 39 | |