--- | |
# Role for generating Helm override.yml file | |
- name: Register root certificate | |
slurp: | |
src: "{{ playbook_dir }}/certs/rootCA.crt" | |
register: root_cert | |
delegate_to: localhost | |
- name: "Set root ca certificate" | |
set_fact: | |
merged_overrides: "{{ overrides | default({}) | combine({'global': {'cacert': root_cert.content | b64decode}}, recursive=True) }}" | |
- name: "Create {{ app_helm_override_file }}" | |
copy: | |
dest: "{{ app_helm_override_file }}" | |
content: "{{ merged_overrides | to_nice_yaml }}" |