blob: 0b14beee9ef25629185a904ef94897e0513a2a40 [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:
Anil Belurb570b512020-05-07 09:06:25 +10009 kubectl_version: 1.15.11
Anil Belur1a87cf52020-05-06 10:22:21 +100010 helm_version: 2.16.6
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010011 helm3_version: 3.3.4
12 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
22 - name: 'Install Helm {{helm_version}}'
23 block:
24 - name: 'Fetch tar.gz'
25 get_url:
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010026 url: "http://storage.googleapis.com/kubernetes-helm/helm-v{{helm_version}}-linux-amd64.tar.gz"
Sylvain Desbureaux28a2ce62020-12-11 08:08:33 +010027 dest: "/tmp/helm-v{{helm_version}}-linux-amd64.tar.gz"
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050028 - name: 'Unarchive'
29 unarchive:
Sylvain Desbureaux28a2ce62020-12-11 08:08:33 +010030 src: "/tmp/helm-v{{helm_version}}-linux-amd64.tar.gz"
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050031 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 Desbureaux5657eda2020-11-26 10:25:39 +010039
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 Wagantall3942f382020-12-11 13:47:32 -080048 url: "https://get.helm.sh/helm-v{{helm3_version}}-linux-amd64.tar.gz"
Sylvain Desbureaux28a2ce62020-12-11 08:08:33 +010049 dest: "/tmp/helm3/helm-v{{helm3_version}}-linux-amd64.tar.gz"
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010050 - name: 'Unarchive'
51 unarchive:
Sylvain Desbureaux28a2ce62020-12-11 08:08:33 +010052 src: "/tmp/helm3/helm-v{{helm3_version}}-linux-amd64.tar.gz"
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010053 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 Phelpsf7d8c952018-04-17 09:23:15 -050061 - name: 'Check kubectl.'
62 command: 'which kubectl'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010063
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'