summaryrefslogtreecommitdiffstats
path: root/ansible/roles/application/tasks
diff options
context:
space:
mode:
authorMichal Zegan <m.zegan@samsung.com>2019-07-01 14:50:49 +0200
committerMichal Zegan <m.zegan@samsung.com>2019-07-08 14:25:31 +0200
commita9fff274a6cb8cc99e0cbb035c89e1d848bf45aa (patch)
tree8e9658f0e59bd5a46f5d0e455e98c9be4713439b /ansible/roles/application/tasks
parentca242324ef4874857aa869484309f80e2a251fd9 (diff)
Modify the way override works
Now the generated app_helm_override_file and the list of helm overrides is separate. The former is to contain things like user provided overrides, the latter is the list of absolute paths to preexisting helm value files. The playbook joins all that into a final list of override files that is then passed to helm. Change-Id: I8b8ded38b39aa9a75e55fc63fa0e11b986556cb8 Issue-ID: OOM-1951 Signed-off-by: Michal Zegan <m.zegan@samsung.com>
Diffstat (limited to 'ansible/roles/application/tasks')
-rw-r--r--ansible/roles/application/tasks/install.yml12
1 files changed, 11 insertions, 1 deletions
diff --git a/ansible/roles/application/tasks/install.yml b/ansible/roles/application/tasks/install.yml
index 003631d7..2ac2fd6b 100644
--- a/ansible/roles/application/tasks/install.yml
+++ b/ansible/roles/application/tasks/install.yml
@@ -59,6 +59,16 @@
name: "{{ app_helm_override_role }}"
when: not app_skip_helm_override
+# The generated override file is added to override list unless skipped.
+- name: Add application helm override file to list of overrides unless skipped
+ set_fact:
+ helm_override_files: "{{ (helm_override_files | default([])) + [app_helm_override_file] }}"
+ when: not app_skip_helm_override
+
+- name: Print final list of override files
+ debug:
+ var: helm_override_files
+
- name: Check for deploy plugin presence
stat:
path: '{{ helm_home_dir.stdout }}/plugins/deploy/deploy.sh'
@@ -71,7 +81,7 @@
{{ app_helm_release_name }}
{{ helm_repository_name }}/{{ app_helm_chart_name }}
--namespace {{ app_kubernetes_namespace }}
- {% if not app_skip_helm_override %} {% for arg in helm_overide_files %} {{ '-f ' + arg }} {% endfor %} {% endif %}
+ {% for arg in helm_override_files %} {{ '-f ' + arg }} {% endfor %}
{% for arg in helm_extra_install_options %} {{ arg.opt }} {% endfor %}
changed_when: true # when executed its a changed type of action
register: helm_install