2022-11-24 09:59:41 +00:00
|
|
|
- name: Add helm repositories
|
|
|
|
kubernetes.core.helm_repository:
|
|
|
|
name: "{{ item.name }}"
|
|
|
|
repo_url: "{{ item.url }}"
|
|
|
|
state: present
|
2023-03-28 11:49:18 +00:00
|
|
|
loop: "{{ platform.helm_repositories + downstream.helm_repositories }}"
|
2022-11-24 09:59:41 +00:00
|
|
|
|
2023-03-28 11:49:18 +00:00
|
|
|
- name: Fetch helm charts for metacluster
|
2022-11-24 09:59:41 +00:00
|
|
|
ansible.builtin.command:
|
|
|
|
cmd: helm fetch {{ item.value.helm.chart }} --untar --version {{ item.value.helm.version }}
|
|
|
|
chdir: /opt/metacluster/helm-charts
|
|
|
|
when: item.value.helm is defined
|
2023-03-28 11:49:18 +00:00
|
|
|
register: helmcharts_metacluster
|
2023-04-05 11:37:31 +00:00
|
|
|
loop: "{{ query('ansible.builtin.dict', components) }}"
|
2022-11-24 09:59:41 +00:00
|
|
|
loop_control:
|
|
|
|
label: "{{ item.key }}"
|
|
|
|
retries: 5
|
|
|
|
delay: 5
|
2023-03-28 11:49:18 +00:00
|
|
|
until: helmcharts_metacluster is not failed
|
|
|
|
|
|
|
|
- name: Fetch helm charts for workloadcluster
|
|
|
|
ansible.builtin.command:
|
2023-04-04 15:22:39 +00:00
|
|
|
cmd: helm fetch {{ item.value.chart }} --untardir ./{{ item.value.namespace }} --untar --version {{ item.value.version }}
|
2023-03-28 11:49:18 +00:00
|
|
|
chdir: /opt/workloadcluster/helm-charts
|
|
|
|
register: helmcharts_workloadcluster
|
2023-04-05 11:37:31 +00:00
|
|
|
loop: "{{ query('ansible.builtin.dict', downstream.helm_charts) }}"
|
2023-03-28 11:49:18 +00:00
|
|
|
loop_control:
|
|
|
|
label: "{{ item.key }}"
|
|
|
|
retries: 5
|
|
|
|
delay: 5
|
|
|
|
until: helmcharts_workloadcluster is not failed
|