Remove regex_replace filter;Refactor dict key names;Make chart values optional
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-04-05 10:47:17 +02:00
parent 641ee2d9a7
commit 2b56677e9a
11 changed files with 21 additions and 13 deletions

View File

@ -2,7 +2,7 @@
- name: Aggregate chart_values into dict
ansible.builtin.set_fact:
metacluster_chartvalues: "{{ metacluster_chartvalues | default({}) | combine({ (item.key | regex_replace('[^A-Za-z0-9]', '')): { 'chart_values': (item.value.helm.chart_values | from_yaml) } }) }}"
metacluster_chartvalues: "{{ metacluster_chartvalues | 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:
@ -22,7 +22,7 @@
- name: Aggregate chart_values into dict
ansible.builtin.set_fact:
workloadcluster_chartvalues: "{{ workloadcluster_chartvalues | default({}) | combine({ (item.key | regex_replace('[^A-Za-z0-9]', '')): { 'chart_values': (item.value.chart_values | from_yaml) } }) }}"
workloadcluster_chartvalues: "{{ workloadcluster_chartvalues | default({}) | combine({ item.key: { 'chart_values': (item.value.chart_values | from_yaml) } }) }}"
when: item.value.chart_values is defined
loop: "{{ lookup('ansible.builtin.dict', downstream.helm_charts) }}"
loop_control: