From aa1f62c0f8e7da56bca173e8174885f1918484df Mon Sep 17 00:00:00 2001 From: Michal Zegan Date: Mon, 25 Mar 2019 13:13:00 +0100 Subject: Allow passing any values to override.yaml This change allows passing any values that will then be stored to override.yaml. These values are passed from the "overrides" key, that may be set either as an extra variable or in inventory/group_vars. The root certificate is merged with the overrides dictionary before saving the file. Change-Id: I772c342b3c9eafe1849d1678b810319afaaf75bf Issue-ID: OOM-1752 Signed-off-by: Michal Zegan --- ansible/roles/application-override/tasks/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ansible/roles') diff --git a/ansible/roles/application-override/tasks/main.yml b/ansible/roles/application-override/tasks/main.yml index 84896fbc..1ecf7c79 100644 --- a/ansible/roles/application-override/tasks/main.yml +++ b/ansible/roles/application-override/tasks/main.yml @@ -6,11 +6,11 @@ register: root_cert delegate_to: localhost -# WA: this is required because deploy plugin dont process params properly -- name: Create override file with global.cacert +- 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: | - global: - cacert: | - {{ root_cert['content'] | b64decode | indent( width=4, indentfirst=False) }} + content: "{{ merged_overrides | to_nice_yaml }}" -- cgit 1.2.3-korg