Reorganize vars dict;Parse & loop through dict key/values
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@ -4,10 +4,25 @@
|
||||
state: directory
|
||||
loop:
|
||||
- /opt/metacluster/components/harbor
|
||||
- /opt/metacluster/helm-charts
|
||||
|
||||
- name: Add helm repositories
|
||||
kubernetes.core.helm_repository:
|
||||
name: "{{ item.name }}"
|
||||
repo_url: "{{ item.url }}"
|
||||
state: present
|
||||
loop: "{{ components.helm_repositories }}"
|
||||
loop: "{{ platform.helm_repositories }}"
|
||||
|
||||
- name: Fetch helm charts
|
||||
ansible.builtin.command:
|
||||
cmd: helm fetch {{ item.value.chart_name }} --untar --version {{ item.value.version }}
|
||||
chdir: /opt/metacluster/helm-charts
|
||||
loop: "{{ lookup('ansible.builtin.dict', components) }}"
|
||||
|
||||
- ansible.builtin.command:
|
||||
cmd: ls -lashR /opt/metacluster/helm-charts
|
||||
register: results
|
||||
- ansible.builtin.debug:
|
||||
var: results
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user