Replace jinja for with filter expression in helm deploy call 61/89261/6
authorMichal Zegan <m.zegan@samsung.com>
Tue, 4 Jun 2019 14:27:40 +0000 (16:27 +0200)
committerMichal Zegan <m.zegan@samsung.com>
Fri, 12 Jul 2019 11:13:44 +0000 (13:13 +0200)
This replaces jinja for constructions used to add helm arguments
with jinja filter usage.

Change-Id: Ia47635466f4a9251d1f33a42080d3538fc52587d
Issue-ID: OOM-1911
Signed-off-by: Michal Zegan <m.zegan@samsung.com>
ansible/roles/application/tasks/install.yml

index 2ac2fd6..bee01e1 100644 (file)
@@ -81,8 +81,8 @@
           {{ app_helm_release_name }}
           {{ helm_repository_name }}/{{ app_helm_chart_name }}
           --namespace {{ app_kubernetes_namespace }}
-          {% for arg in helm_override_files %} {{ '-f ' + arg }} {% endfor %}
-          {% for arg in helm_extra_install_options %} {{ arg.opt }} {% endfor %}
+          {{ helm_override_files | map('regex_replace', '^', '-f ') | join(' ') }}
+          {{ helm_extra_install_options | map(attribute='opt') | join(' ') }}
   changed_when: true  # when executed its a changed type of action
   register: helm_install
   failed_when: helm_install.stderr