diff options
Diffstat (limited to 'ansible/roles/application/tasks/setup-helm3.yml')
-rw-r--r-- | ansible/roles/application/tasks/setup-helm3.yml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ansible/roles/application/tasks/setup-helm3.yml b/ansible/roles/application/tasks/setup-helm3.yml index ce8cbb3a..4b50ec1c 100644 --- a/ansible/roles/application/tasks/setup-helm3.yml +++ b/ansible/roles/application/tasks/setup-helm3.yml @@ -1,4 +1,17 @@ --- +- name: List helm repos + command: "{{ helm_bin_dir }}/helm repo list" + register: helm_repo_list + changed_when: false # for idempotency + failed_when: + - helm_repo_list.rc > 0 + - "'Error: no repositories to show' not in helm_repo_list.stderr" + +- name: Helm Add Repo + command: "{{ helm_bin_dir }}/helm repo add {{ helm_repository_name | mandatory }} {{ helm_repository_url | mandatory }}" + when: "'local' not in helm_repo_list.stdout" + changed_when: true # when executed its a changed type of action + - name: Check for deploy plugin presence stat: path: '{{ helm_data_dir }}/plugins/deploy/deploy.sh' |