Packer.Images/ansible/roles/metacluster/tasks/components.yml

29 lines
758 B
YAML
Raw Normal View History

- 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:
2022-06-24 22:54:36 +00:00
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