summaryrefslogtreecommitdiffstats
path: root/ansible/roles/application/tasks/setup-helm.yml
blob: 5e36547dd2c65bc6aa2127648b471891b5dad57f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
---
- 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: false  # for idempotency

- name: Check for deploy plugin presence
  stat:
    path: '{{ helm_data_dir }}/plugins/deploy/deploy.sh'
  register: deploy_plugin_presence