Write whole dict to file
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
abacbf90ce
commit
0b97ae2fc5
@ -1,3 +1 @@
|
||||
#jinja2:variable_start_string:'[%' , variable_end_string:'%]'
|
||||
|
||||
components:
|
||||
|
@ -25,13 +25,19 @@
|
||||
|
||||
- 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 | default('~')) } }) }}"
|
||||
chart_values: "{{ chart_values | default({}) | combine({ item.key: { 'chart_values': item.value.helm.chart_values } }) }}"
|
||||
when: item.value.helm.chart_values is defined
|
||||
loop: "{{ lookup('ansible.builtin.dict', components) }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ chart_values | to_nice_yaml }}"
|
||||
msg: "{{ chart_values | to_nice_yaml(default_style='\"', indent=2, width=4096) }}"
|
||||
|
||||
- name: Write dict to vars_file
|
||||
ansible.builtin.blockinfile:
|
||||
path: /opt/firstboot/ansible/vars/metacluster.yml
|
||||
block: "{{ { 'components': chart_values } | to_nice_yaml(default_style='\"', indent=2, width=4096) }}"
|
||||
|
||||
- name: Parse helm charts for container images
|
||||
ansible.builtin.shell:
|
||||
|
Loading…
Reference in New Issue
Block a user