blob: 2ab517f7dffab5b71a69777f81575ace8fe0d44e [file] [log] [blame]
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -05001---
Bengt Thuree092ee882018-11-29 16:16:24 +11002- import_playbook: ../common-packer/provision/docker.yaml
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -05003
4- hosts: all
5 become_user: root
6 become_method: sudo
7
8 vars:
efiacor50b8b442022-04-11 18:33:34 +01009 kubectl_version: 1.19.11
10 helm3_6_version: 3.6.3
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010011 chartmuseum_version: 0.12.0
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050012
13 tasks:
14 - name: 'Install kubectl {{kubectl_version}}'
15 get_url:
Sylvain Desbureaux28a2ce62020-12-11 08:08:33 +010016 url: "https://storage.googleapis.com/kubernetes-release/release/v{{kubectl_version}}/bin/linux/amd64/kubectl"
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050017 dest: /usr/local/bin/kubectl
18 mode: 0775
19 become: yes
20
efiacora74e3912022-04-19 10:09:40 +010021 - name: 'Install Helm3.6 {{helm3_6_version}}'
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050022 block:
efiacora74e3912022-04-19 10:09:40 +010023 - name: 'Create directory /tmp/helm3.6'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010024 file:
efiacora74e3912022-04-19 10:09:40 +010025 path: /tmp/helm3.6
Sylvain Desbureaux47840982021-02-09 08:21:21 +010026 state: directory
efiacor50b8b442022-04-11 18:33:34 +010027 - name: 'Fetch tar.gz for Helm 3.6'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010028 get_url:
efiacor50b8b442022-04-11 18:33:34 +010029 url: "https://get.helm.sh/helm-v{{helm3_6_version}}-linux-amd64.tar.gz"
efiacora74e3912022-04-19 10:09:40 +010030 dest: /tmp/helm3.6
efiacor50b8b442022-04-11 18:33:34 +010031 - name: 'Unarchive Helm 3.6'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010032 unarchive:
efiacora74e3912022-04-19 10:09:40 +010033 src: "/tmp/helm3.6/helm-v{{helm3_6_version}}-linux-amd64.tar.gz"
34 dest: /tmp/helm3.6
Sylvain Desbureaux47840982021-02-09 08:21:21 +010035 remote_src: true
36 become: yes
efiacor50b8b442022-04-11 18:33:34 +010037 - name: 'Move Helm 3.6 bin to /usr/local/bin and set as executable'
efiacora74e3912022-04-19 10:09:40 +010038 command: 'mv /tmp/helm3.6/linux-amd64/helm /usr/local/bin/helm3.6'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010039 become: yes
efiacor50b8b442022-04-11 18:33:34 +010040 - name: 'Check Helm 3.6'
41 command: 'which helm3.6'
Jessica Wagantallc292c952021-02-16 11:46:11 -080042 - name: 'Check kubectl {{kubectl_version}}'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010043 command: 'which kubectl'
44
efiacor50b8b442022-04-11 18:33:34 +010045 - name: 'Install Helm 3.6'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010046 shell: |
efiacora74e3912022-04-19 10:09:40 +010047 echo "----> Installing helm3.6"
efiacor50b8b442022-04-11 18:33:34 +010048 wget 'https://get.helm.sh/helm-v{{helm3_6_version}}-linux-amd64.tar.gz'
49 tar -xvf 'https://get.helm.sh/helm-v{{helm3_6_version}}-linux-amd64.tar.gz'
50 mv linux-amd64/helm /usr/local/bin/helm3.6
51 which helm3.6
Sylvain Desbureaux47840982021-02-09 08:21:21 +010052 become: true
53
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010054 - name: 'Install ChartMuseum {{chartmuseum_version}}'
55 block:
Jessica Wagantallc292c952021-02-16 11:46:11 -080056 - name: 'Fetch bin for ChartMuseum'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010057 get_url:
58 url: "https://s3.amazonaws.com/chartmuseum/release/v{{ chartmuseum_version }}/bin/linux/amd64/chartmuseum"
59 dest: /usr/local/bin/chartmuseum
60 mode: "0755"
61 become: yes
Jessica Wagantallc292c952021-02-16 11:46:11 -080062 - name: 'Check ChartMuseum {{chartmuseum_version}}'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010063 command: 'which chartmuseum'