blob: d3ab71bbdf8614a7005ef51ae0249fa555f9ea3c [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:
efiacorc3c78f62022-08-11 09:09:01 +01009 kubectl_version: 1.23.7
efiacor50b8b442022-04-11 18:33:34 +010010 helm3_6_version: 3.6.3
efiacorc3c78f62022-08-11 09:09:01 +010011 helm3_8_version: 3.8.2
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010012 chartmuseum_version: 0.12.0
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050013
14 tasks:
15 - name: 'Install kubectl {{kubectl_version}}'
16 get_url:
Sylvain Desbureaux28a2ce62020-12-11 08:08:33 +010017 url: "https://storage.googleapis.com/kubernetes-release/release/v{{kubectl_version}}/bin/linux/amd64/kubectl"
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050018 dest: /usr/local/bin/kubectl
19 mode: 0775
20 become: yes
21
efiacora74e3912022-04-19 10:09:40 +010022 - name: 'Install Helm3.6 {{helm3_6_version}}'
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050023 block:
efiacora74e3912022-04-19 10:09:40 +010024 - name: 'Create directory /tmp/helm3.6'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010025 file:
efiacora74e3912022-04-19 10:09:40 +010026 path: /tmp/helm3.6
Sylvain Desbureaux47840982021-02-09 08:21:21 +010027 state: directory
efiacor50b8b442022-04-11 18:33:34 +010028 - name: 'Fetch tar.gz for Helm 3.6'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010029 get_url:
efiacor50b8b442022-04-11 18:33:34 +010030 url: "https://get.helm.sh/helm-v{{helm3_6_version}}-linux-amd64.tar.gz"
efiacora74e3912022-04-19 10:09:40 +010031 dest: /tmp/helm3.6
efiacor50b8b442022-04-11 18:33:34 +010032 - name: 'Unarchive Helm 3.6'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010033 unarchive:
efiacora74e3912022-04-19 10:09:40 +010034 src: "/tmp/helm3.6/helm-v{{helm3_6_version}}-linux-amd64.tar.gz"
35 dest: /tmp/helm3.6
Sylvain Desbureaux47840982021-02-09 08:21:21 +010036 remote_src: true
37 become: yes
efiacor50b8b442022-04-11 18:33:34 +010038 - name: 'Move Helm 3.6 bin to /usr/local/bin and set as executable'
efiacora74e3912022-04-19 10:09:40 +010039 command: 'mv /tmp/helm3.6/linux-amd64/helm /usr/local/bin/helm3.6'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010040 become: yes
efiacor50b8b442022-04-11 18:33:34 +010041 - name: 'Check Helm 3.6'
42 command: 'which helm3.6'
Jessica Wagantallc292c952021-02-16 11:46:11 -080043 - name: 'Check kubectl {{kubectl_version}}'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010044 command: 'which kubectl'
45
efiacor50b8b442022-04-11 18:33:34 +010046 - name: 'Install Helm 3.6'
Sylvain Desbureaux47840982021-02-09 08:21:21 +010047 shell: |
efiacora74e3912022-04-19 10:09:40 +010048 echo "----> Installing helm3.6"
efiacor50b8b442022-04-11 18:33:34 +010049 wget 'https://get.helm.sh/helm-v{{helm3_6_version}}-linux-amd64.tar.gz'
50 tar -xvf 'https://get.helm.sh/helm-v{{helm3_6_version}}-linux-amd64.tar.gz'
51 mv linux-amd64/helm /usr/local/bin/helm3.6
52 which helm3.6
Sylvain Desbureaux47840982021-02-09 08:21:21 +010053 become: true
54
efiacorc3c78f62022-08-11 09:09:01 +010055 - name: 'Install Helm3.8 {{helm3_8_version}}'
56 block:
57 - name: 'Create directory /tmp/helm3.8'
58 file:
59 path: /tmp/helm3.8
60 state: directory
61 - name: 'Fetch tar.gz for Helm 3.8'
62 get_url:
63 url: "https://get.helm.sh/helm-v{{helm3_8_version}}-linux-amd64.tar.gz"
64 dest: /tmp/helm3.8
65 - name: 'Unarchive Helm 3.8'
66 unarchive:
67 src: "/tmp/helm3.8/helm-v{{helm3_8_version}}-linux-amd64.tar.gz"
68 dest: /tmp/helm3.8
69 remote_src: true
70 become: yes
71 - name: 'Move Helm 3.8 bin to /usr/local/bin and set as executable'
72 command: 'mv /tmp/helm3.8/linux-amd64/helm /usr/local/bin/helm3.8'
73 become: yes
74 - name: 'Check Helm 3.8'
75 command: 'which helm3.8'
76 - name: 'Check kubectl {{kubectl_version}}'
77 command: 'which kubectl'
78
79 - name: 'Install Helm 3.8'
80 shell: |
81 echo "----> Installing helm3.8"
82 wget 'https://get.helm.sh/helm-v{{helm3_8_version}}-linux-amd64.tar.gz'
83 tar -xvf 'https://get.helm.sh/helm-v{{helm3_8_version}}-linux-amd64.tar.gz'
84 mv linux-amd64/helm /usr/local/bin/helm3.8
85 which helm3.8
86 become: true
87
88
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010089 - name: 'Install ChartMuseum {{chartmuseum_version}}'
90 block:
Jessica Wagantallc292c952021-02-16 11:46:11 -080091 - name: 'Fetch bin for ChartMuseum'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010092 get_url:
93 url: "https://s3.amazonaws.com/chartmuseum/release/v{{ chartmuseum_version }}/bin/linux/amd64/chartmuseum"
94 dest: /usr/local/bin/chartmuseum
95 mode: "0755"
96 become: yes
Jessica Wagantallc292c952021-02-16 11:46:11 -080097 - name: 'Check ChartMuseum {{chartmuseum_version}}'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010098 command: 'which chartmuseum'