Refactor templating #42
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2022-07-11 09:24:04 +02:00
parent 2847542976
commit f04095db8c
3 changed files with 25 additions and 19 deletions

View File

@ -25,16 +25,16 @@
- name: Aggregate chart_values into dict
ansible.builtin.set_fact:
chart_values: "{{ chart_values | default({}) | combine({ item.key: { 'chart_values': item.value.helm.chart_values } }) }}"
chart_values: "{{ chart_values | default({}) | combine({ item.key: { 'chart_values': (item.value.helm.chart_values | from_yaml) } }) }}"
when: item.value.helm.chart_values is defined
loop: "{{ lookup('ansible.builtin.dict', components) }}"
loop_control:
label: "{{ item.key }}"
- name: Write dict to vars_file
ansible.builtin.blockinfile:
path: /opt/firstboot/ansible/vars/metacluster.yml
block: "{{ { 'components': chart_values } | to_nice_yaml(indent=2, width=4096) }}"
ansible.builtin.copy:
dest: /opt/firstboot/ansible/vars/metacluster.yml
content: "{{ { 'components': chart_values } | to_nice_yaml(indent=2, width=4096) }}"
- name: Parse helm charts for container images
ansible.builtin.shell: