Samuli Silvius | 51d7d01 | 2019-03-19 08:45:54 +0200 | [diff] [blame] | 1 | --- |
| 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 Zegan | aa1f62c | 2019-03-25 13:13:00 +0100 | [diff] [blame] | 9 | - 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 Silvius | 51d7d01 | 2019-03-19 08:45:54 +0200 | [diff] [blame] | 14 | copy: |
| 15 | dest: "{{ app_helm_override_file }}" |
Michal Zegan | aa1f62c | 2019-03-25 13:13:00 +0100 | [diff] [blame] | 16 | content: "{{ merged_overrides | to_nice_yaml }}" |