Refactor templating logic
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Danny Bessems 2022-07-09 09:18:13 +02:00
parent 2be42989e5
commit 3a2dbe572e
1 changed files with 11 additions and 10 deletions

View File

@ -21,16 +21,17 @@
loop_control:
label: "{{ item.key }}"
- name: Inject chart values into ansible var files
ansible.builtin.blockinfile:
path: /opt/firstboot/ansible/vars/metacluster.yml
block: |
{{ item.key }}:
{{ item.value.helm.chart_values | default(omit) }}
marker: "# {mark} ANSIBLE MANAGED BLOCK -- {{ item.key }}"
loop: "{{ lookup('ansible.builtin.dict', components) }}"
loop_control:
label: "{{ item.key }}"
- block:
- name: Aggregate chart_values into dict
ansible.builtin.set_fact:
chart_values: "{{ chart_values | default({}) | combine({ item.key: (item.value.helm.chart_values | default('~')) }) }}"
loop: "{{ lookup('ansible.builtin.dict', components) }}"
loop_control:
label: "{{ item.key }}"
- ansible.builtin.debug:
msg: chart_values | to_nice_yaml
- name: Parse helm charts for container images
ansible.builtin.shell: