Archive helm_charts with command module 48/99148/7
authorOndřej Šmalec <o.smalec@partner.samsung.com>
Wed, 4 Dec 2019 14:36:31 +0000 (15:36 +0100)
committerOndřej Šmalec <o.smalec@partner.samsung.com>
Fri, 6 Dec 2019 11:44:21 +0000 (11:44 +0000)
Due to bug in ansible archive module empty files are not added into tar file.
Hence kibana-onborading.json missing in helm_charts on infra node.
Changing archive module into command module to tar helm_charts.

Issue-ID: OOM-2231
Signed-off-by: Ondřej Šmalec <o.smalec@partner.samsung.com>
Change-Id: I5527bd0f52976a93ac2861d9de010fbb79eb97fd

ansible/roles/application/tasks/transfer-helm-charts.yml

index 5e4240b..56c95cc 100644 (file)
@@ -3,9 +3,12 @@
 - name: Distribute helm charts to infra node
   block:
     - name: Archive helm charts
-      archive:
-        path: "{{ app_helm_charts_install_directory }}/*"
-        dest: "{{ app_helm_charts_install_directory }}.tgz"
+      command: tar -cvzf {{ app_helm_charts_install_directory }}.tgz -C {{ app_helm_charts_install_directory }} .
+      args:
+        warn: false
+      tags:
+        - skip_ansible_lint  # Prevent '[303] tar used in place of unarchive module'
+      changed_when: false  # for idempotency
       delegate_to: localhost
     - name: Create helm charts dir on infra
       file: