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