blob: a5f6ba2ed135bbe80195bdbccc9177706e840367 [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 Desbureaux47840982021-02-09 08:21:21 +010011 helm3_3_version: 3.3.4
12 helm3_version: 3.5.1
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010013 chartmuseum_version: 0.12.0
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050014
15 tasks:
16 - name: 'Install kubectl {{kubectl_version}}'
17 get_url:
Sylvain Desbureaux28a2ce62020-12-11 08:08:33 +010018 url: "https://storage.googleapis.com/kubernetes-release/release/v{{kubectl_version}}/bin/linux/amd64/kubectl"
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050019 dest: /usr/local/bin/kubectl
20 mode: 0775
21 become: yes
22
23 - name: 'Install Helm {{helm_version}}'
24 block:
25 - name: 'Fetch tar.gz'
26 get_url:
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010027 url: "http://storage.googleapis.com/kubernetes-helm/helm-v{{helm_version}}-linux-amd64.tar.gz"
Sylvain Desbureaux28a2ce62020-12-11 08:08:33 +010028 dest: "/tmp/helm-v{{helm_version}}-linux-amd64.tar.gz"
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050029 - name: 'Unarchive'
30 unarchive:
Sylvain Desbureaux28a2ce62020-12-11 08:08:33 +010031 src: "/tmp/helm-v{{helm_version}}-linux-amd64.tar.gz"
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050032 dest: /tmp
33 remote_src: true
34 become: yes
35 - name: 'Move helm to /usr/local/bin and set as executable'
36 command: 'mv /tmp/linux-amd64/helm /usr/local/bin/helm'
37 become: yes
38 - name: 'Check helm.'
39 command: 'which helm'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010040
Sylvain Desbureaux47840982021-02-09 08:21:21 +010041 - name: 'Install Helm 3.3 {{helm3_3_version}}'
42 block:
43 - name: create directory
44 file:
45 path: /tmp/helm3
46 state: directory
47 - name: 'Fetch tar.gz'
48 get_url:
49 url: "https://get.helm.sh/helm-v{{helm3_3_version}}-linux-amd64.tar.gz"
50 dest: /tmp/helm3_3
51 - name: 'Unarchive'
52 unarchive:
53 src: "/tmp/helm3_3/helm-v{{helm3_3_version}}-linux-amd64.tar.gz"
54 dest: /tmp/helm3_3
55 remote_src: true
56 become: yes
57 - name: 'Move helm to /usr/local/bin and set as executable'
58 command: 'mv /tmp/helm3_3/linux-amd64/helm /usr/local/bin/helm3.3'
59 become: yes
60 - name: 'Check helm3.'
61 command: 'which helm3'
62 - name: 'Check kubectl.'
63 command: 'which kubectl'
64
65 - name: Install helm 3.3
66 shell: |
67 echo "----> Installing helm 3.3"
68 wget 'https://get.helm.sh/helm-v{{helm3_3_version}}-linux-amd64.tar.gz'
69 tar -xvf 'https://get.helm.sh/helm-v{{helm3_3_version}}-linux-amd64.tar.gz'
70 mv linux-amd64/helm /usr/local/bin/helm3.3
71 which helm3.3
72 become: true
73
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010074 - name: 'Install Helm3 {{helm3_version}}'
75 block:
76 - name: create directory
77 file:
78 path: /tmp/helm3
79 state: directory
80 - name: 'Fetch tar.gz'
81 get_url:
Jessica Wagantall3942f382020-12-11 13:47:32 -080082 url: "https://get.helm.sh/helm-v{{helm3_version}}-linux-amd64.tar.gz"
Jessica Wagantall9eaf79a2020-12-11 15:54:40 -080083 dest: /tmp/helm3
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010084 - name: 'Unarchive'
85 unarchive:
Sylvain Desbureaux28a2ce62020-12-11 08:08:33 +010086 src: "/tmp/helm3/helm-v{{helm3_version}}-linux-amd64.tar.gz"
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010087 dest: /tmp/helm3
88 remote_src: true
89 become: yes
90 - name: 'Move helm to /usr/local/bin and set as executable'
91 command: 'mv /tmp/helm3/linux-amd64/helm /usr/local/bin/helm3'
92 become: yes
93 - name: 'Check helm3.'
94 command: 'which helm3'
Jeremy Phelpsf7d8c952018-04-17 09:23:15 -050095 - name: 'Check kubectl.'
96 command: 'which kubectl'
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +010097
Jessica Wagantall9eaf79a2020-12-11 15:54:40 -080098 - name: Install helm3
99 shell: |
100 echo "----> Installing helm3"
Sylvain Desbureaux47840982021-02-09 08:21:21 +0100101 wget 'https://get.helm.sh/helm-v{{helm3_version}}-linux-amd64.tar.gz'
102 tar -xvf 'https://get.helm.sh/helm-v{{helm3_version}}-linux-amd64.tar.gz'
Jessica Wagantall9eaf79a2020-12-11 15:54:40 -0800103 mv linux-amd64/helm /usr/local/bin/helm3
104 which helm3
105 become: true
106
Sylvain Desbureaux5657eda2020-11-26 10:25:39 +0100107 - name: 'Install ChartMuseum {{chartmuseum_version}}'
108 block:
109 - name: 'Fetch bin'
110 get_url:
111 url: "https://s3.amazonaws.com/chartmuseum/release/v{{ chartmuseum_version }}/bin/linux/amd64/chartmuseum"
112 dest: /usr/local/bin/chartmuseum
113 mode: "0755"
114 become: yes
115 - name: 'Check chartmuseum.'
116 command: 'which chartmuseum'