summaryrefslogtreecommitdiffstats
path: root/ansible/roles/application-override/tasks/main.yml
blob: 1ecf7c7920082a5377856c82347130ffad72f454 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
---
# 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 }}"