Install helm binary in ccm-deploy role before using it
The kubernetes.core.helm module requires helm CLI to be installed on the target node. Added check and install step using the official helm install script.
This commit is contained in:
@@ -10,6 +10,26 @@
|
||||
msg: "hcloud secret not found in kube-system namespace. CCM requires it."
|
||||
when: hcloud_secret_check.rc != 0
|
||||
|
||||
- name: Check if helm is installed
|
||||
command: which helm
|
||||
register: helm_check
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- name: Install helm
|
||||
when: helm_check.rc != 0
|
||||
block:
|
||||
- name: Download helm install script
|
||||
get_url:
|
||||
url: https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
|
||||
dest: /tmp/get-helm-3.sh
|
||||
mode: "0755"
|
||||
|
||||
- name: Run helm install script
|
||||
command: /tmp/get-helm-3.sh
|
||||
args:
|
||||
creates: /usr/local/bin/helm
|
||||
|
||||
- name: Add Hetzner Helm repository
|
||||
kubernetes.core.helm_repository:
|
||||
name: hcloud
|
||||
|
||||
Reference in New Issue
Block a user