Packer.Images/ansible/roles/metacluster/tasks/components.yml
Danny Bessems d39d594bf0
Some checks failed
continuous-integration/drone/push Build is failing
Reorganize vars dict;Parse & loop through dict key/values
2022-06-26 17:54:19 +02:00

29 lines
758 B
YAML

- name: Create folder structure(s)
ansible.builtin.file:
path: "{{ item }}"
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: "{{ 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