diff --git a/molecule/default/roles/helm/meta/main.yml b/molecule/default/roles/helm/meta/main.yml new file mode 100644 index 00000000..d05af689 --- /dev/null +++ b/molecule/default/roles/helm/meta/main.yml @@ -0,0 +1,3 @@ +--- +collections: + - kubernetes.core diff --git a/molecule/default/roles/helm/tasks/test_crds.yml b/molecule/default/roles/helm/tasks/test_crds.yml index 071ebc71..f8370f4a 100644 --- a/molecule/default/roles/helm/tasks/test_crds.yml +++ b/molecule/default/roles/helm/tasks/test_crds.yml @@ -15,6 +15,7 @@ - name: Install chart while skipping CRDs helm: + binary_path: "{{ helm_binary }}" chart_ref: "/tmp/helm_test_crds/{{ test_chart }}" namespace: "{{ helm_namespace }}" name: test-crds @@ -46,12 +47,14 @@ # Helm won't install CRDs into an existing release, so we need to delete this, first - name: Uninstall chart helm: + binary_path: "{{ helm_binary }}" namespace: "{{ helm_namespace }}" name: test-crds state: absent - name: Install chart with CRDs helm: + binary_path: "{{ helm_binary }}" chart_ref: "/tmp/helm_test_crds/{{ test_chart }}" namespace: "{{ helm_namespace }}" name: test-crds diff --git a/molecule/default/roles/helm/tasks/tests_chart/from_repository.yml b/molecule/default/roles/helm/tasks/tests_chart/from_repository.yml index 067b216b..566bfff9 100644 --- a/molecule/default/roles/helm/tasks/tests_chart/from_repository.yml +++ b/molecule/default/roles/helm/tasks/tests_chart/from_repository.yml @@ -1,6 +1,7 @@ --- - name: Add chart repo helm_repository: + binary_path: "{{ helm_binary }}" name: test_helm repo_url: "{{ chart_test_repo }}" @@ -14,6 +15,7 @@ - name: Add chart repo helm_repository: + binary_path: "{{ helm_binary }}" name: test_helm repo_url: "{{ chart_test_repo }}" state: absent diff --git a/molecule/default/roles/helm/tasks/tests_helm_diff.yml b/molecule/default/roles/helm/tasks/tests_helm_diff.yml index c461be6d..5b4ec579 100644 --- a/molecule/default/roles/helm/tasks/tests_helm_diff.yml +++ b/molecule/default/roles/helm/tasks/tests_helm_diff.yml @@ -6,6 +6,7 @@ block: - name: Install helm diff helm_plugin: + binary_path: "{{ helm_binary }}" state: present plugin_path: https://github.com/databus23/helm-diff @@ -136,6 +137,7 @@ - name: Uninstall helm diff helm_plugin: + binary_path: "{{ helm_binary }}" state: absent plugin_name: diff ignore_errors: yes diff --git a/molecule/default/roles/helm/tasks/tests_helm_plugin.yml b/molecule/default/roles/helm/tasks/tests_helm_plugin.yml index 7a97e3e1..d64573c2 100644 --- a/molecule/default/roles/helm/tasks/tests_helm_plugin.yml +++ b/molecule/default/roles/helm/tasks/tests_helm_plugin.yml @@ -97,6 +97,7 @@ - name: Gather Helm plugin info helm_plugin_info: + binary_path: "{{ helm_binary }}" register: r - name: Set sample_plugin version diff --git a/molecule/default/roles/helm/tasks/tests_repository.yml b/molecule/default/roles/helm/tasks/tests_repository.yml index 9d274819..eedea01a 100644 --- a/molecule/default/roles/helm/tasks/tests_repository.yml +++ b/molecule/default/roles/helm/tasks/tests_repository.yml @@ -1,11 +1,13 @@ --- - name: "Ensure test_helm_repo doesn't exist" helm_repository: + binary_path: "{{ helm_binary }}" name: test_helm_repo state: absent - name: Add test_helm_repo chart repository helm_repository: + binary_path: "{{ helm_binary }}" name: test_helm_repo repo_url: "{{ chart_test_repo }}" register: repository @@ -17,6 +19,7 @@ - name: Check idempotency helm_repository: + binary_path: "{{ helm_binary }}" name: test_helm_repo repo_url: "{{ chart_test_repo }}" register: repository @@ -28,6 +31,7 @@ - name: Failed to add repository with the same name helm_repository: + binary_path: "{{ helm_binary }}" name: test_helm_repo repo_url: "https://other-charts.url" register: repository_errors @@ -40,6 +44,7 @@ - name: Remove test_helm_repo chart repository helm_repository: + binary_path: "{{ helm_binary }}" name: test_helm_repo state: absent register: repository @@ -51,6 +56,7 @@ - name: Check idempotency after remove helm_repository: + binary_path: "{{ helm_binary }}" name: test_helm_repo state: absent register: repository