From e4477953951e80e19e421171d35f22debfde0d88 Mon Sep 17 00:00:00 2001 From: MichaelFisher1997 Date: Mon, 23 Mar 2026 00:07:39 +0000 Subject: [PATCH] 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. --- ansible/roles/ccm-deploy/tasks/main.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ansible/roles/ccm-deploy/tasks/main.yml b/ansible/roles/ccm-deploy/tasks/main.yml index a0cb42a..85fabb1 100644 --- a/ansible/roles/ccm-deploy/tasks/main.yml +++ b/ansible/roles/ccm-deploy/tasks/main.yml @@ -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