From dfbd78d40d39bc54fda89a0501cd06398540045e Mon Sep 17 00:00:00 2001 From: Benjamin Schanzel Date: Wed, 10 Mar 2021 10:37:47 +0100 Subject: [PATCH] ensure-helm: skip helm init for helm v3 and newer The init command was removed from helm with v3, no initialization is needed anymore. So only run the init task if the version is <= 2. Change-Id: I59b0c6efa0a2e6b94267fd3bb7a9701bc4c51048 --- roles/ensure-helm/tasks/main.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/ensure-helm/tasks/main.yaml b/roles/ensure-helm/tasks/main.yaml index 232297259..bd74cfd52 100644 --- a/roles/ensure-helm/tasks/main.yaml +++ b/roles/ensure-helm/tasks/main.yaml @@ -15,6 +15,9 @@ - name: Initialize Helm shell: helm init --client-only + # NOTE(b.schanzel): The init command was removed with helm v3 and no + # initialization is needed anymore + when: helm_version is version('3', '<') tags: # NOTE(mnaser): The `helm` module does not support running init only. - skip_ansible_lint