summaryrefslogtreecommitdiffstats
path: root/ansible
diff options
context:
space:
mode:
authorMichal Zegan <m.zegan@samsung.com>2019-03-25 13:13:00 +0100
committerMichal Ptacek <m.ptacek@partner.samsung.com>2019-04-01 14:01:16 +0000
commitaa1f62c0f8e7da56bca173e8174885f1918484df (patch)
tree1882b7085a4ccb0902e772ac07e7b805d34c8c9e /ansible
parent51d7d013fbff9706910be7cbecd1720967ff486f (diff)
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 <m.zegan@samsung.com>
Diffstat (limited to 'ansible')
-rw-r--r--ansible/roles/application-override/tasks/main.yml12
1 files changed, 6 insertions, 6 deletions
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 }}"