blob: 1ecf7c7920082a5377856c82347130ffad72f454 [file] [log] [blame]
Samuli Silvius51d7d012019-03-19 08:45:54 +02001---
2# Role for generating Helm override.yml file
3- name: Register root certificate
4 slurp:
5 src: "{{ playbook_dir }}/certs/rootCA.crt"
6 register: root_cert
7 delegate_to: localhost
8
Michal Zeganaa1f62c2019-03-25 13:13:00 +01009- name: "Set root ca certificate"
10 set_fact:
11 merged_overrides: "{{ overrides | default({}) | combine({'global': {'cacert': root_cert.content | b64decode}}, recursive=True) }}"
12
13- name: "Create {{ app_helm_override_file }}"
Samuli Silvius51d7d012019-03-19 08:45:54 +020014 copy:
15 dest: "{{ app_helm_override_file }}"
Michal Zeganaa1f62c2019-03-25 13:13:00 +010016 content: "{{ merged_overrides | to_nice_yaml }}"