aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/k8s/tasks/install_helm.yml
diff options
context:
space:
mode:
authorclyhtsuriva <aimeric@adjutor.xyz>2025-07-09 19:29:30 +0200
committerclyhtsuriva <aimeric@adjutor.xyz>2025-07-09 19:29:30 +0200
commitb23b17896cbb3fa368b302bae96dd1183aad5374 (patch)
treecd03a8a22a3b82df66b1849817d286e6cb5314d4 /ansible/roles/k8s/tasks/install_helm.yml
parentca77065087fb7ee1b6a5bbad7948c65b8f02301e (diff)
ansible: install helm on k8s mastersHEADmaster
Diffstat (limited to 'ansible/roles/k8s/tasks/install_helm.yml')
-rw-r--r--ansible/roles/k8s/tasks/install_helm.yml30
1 files changed, 30 insertions, 0 deletions
diff --git a/ansible/roles/k8s/tasks/install_helm.yml b/ansible/roles/k8s/tasks/install_helm.yml
new file mode 100644
index 0000000..244950a
--- /dev/null
+++ b/ansible/roles/k8s/tasks/install_helm.yml
@@ -0,0 +1,30 @@
+---
+- name: Check if Helm is already installed
+ command: helm version --short
+ register: helm_installed
+ ignore_errors: true
+ changed_when: false
+
+- name: Download Helm install script
+ get_url:
+ url: https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
+ dest: /tmp/get_helm.sh
+ mode: '0755'
+ when: helm_installed is failed or helm_installed.rc != 0
+
+- name: Install Helm
+ command: /tmp/get_helm.sh
+ become: true
+ when: helm_installed is failed or helm_installed.rc != 0
+ register: helm_install_result
+ changed_when: "'Helm' in helm_install_result.stdout"
+
+- name: Verify Helm installation
+ command: helm version --short
+ register: helm_version
+ changed_when: false
+
+- name: Display Helm version
+ debug:
+ msg: "Helm {{ helm_version.stdout }} is installed"
+...