Make it possible to set helm version to install
Helm and tiller are also installed on the jumphost.
Change-Id: I00658e200f4c0f72ac33035c17a2c96dfdd05c1b
diff --git a/playbooks/roles/configure-installer/tasks/main.yml b/playbooks/roles/configure-installer/tasks/main.yml
index 9a9e746..db7237e 100644
--- a/playbooks/roles/configure-installer/tasks/main.yml
+++ b/playbooks/roles/configure-installer/tasks/main.yml
@@ -70,6 +70,13 @@
regexp: "^kube_version:.*"
line: "kube_version: {{ kubernetes_version }}"
+# set helm version to install
+- name: Set helm version to '{{ helm_version }}'
+ lineinfile:
+ path: "{{ engine_cache }}/repos/kubespray/roles/download/defaults/main.yml"
+ regexp: "^helm_version:.*"
+ line: "helm_version: {{ helm_version }}"
+
# TODO: reuse of bifrost dynamic inventory is only valid for the cases that use
# bifrost for provisioning so this needs fixing and we could perhaps switch to
# our own inventory, dynamic or static.
diff --git a/playbooks/roles/post-deployment/tasks/main.yml b/playbooks/roles/post-deployment/tasks/main.yml
index 101eb36..f94a6b9 100644
--- a/playbooks/roles/post-deployment/tasks/main.yml
+++ b/playbooks/roles/post-deployment/tasks/main.yml
@@ -42,4 +42,29 @@
vars:
ansible_become: false
+- name: Download helm client
+ unarchive:
+ src: "{{ helm_client_download_url }}"
+ remote_src: yes
+ dest: /tmp
+
+- name: Place helm and tiller binaries to /usr/local/bin
+ copy:
+ src: "/tmp/linux-amd64/{{ item }}"
+ dest: "/usr/local/bin/{{ item }}"
+ owner: root
+ group: root
+ mode: 0755
+ with_items:
+ - helm
+ - tiller
+
+- name: Delete temporary files and folders
+ file:
+ path: "{{ item }}"
+ state: absent
+ with_items:
+ - "/tmp/helm-{{ helm_version }}-linux-amd64.tar.gz"
+ - "/tmp/linux-amd64"
+
# vim: set ts=2 sw=2 expandtab:
diff --git a/playbooks/roles/post-deployment/vars/main.yml b/playbooks/roles/post-deployment/vars/main.yml
index a23321e..828ff44 100644
--- a/playbooks/roles/post-deployment/vars/main.yml
+++ b/playbooks/roles/post-deployment/vars/main.yml
@@ -15,6 +15,8 @@
#
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
+helm_client_download_url: "https://get.helm.sh/helm-{{ helm_version }}-linux-amd64.tar.gz"
+
rook_data_dir_path: "/var/lib/rook"
rook_storage_dir_path: "/rook/storage-dir"