--- # before custom specific code is executed we need to move helm charts to infra - name: Distribute helm charts to infra node block: - name: Archive helm charts 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: path: "{{ app_helm_charts_infra_directory }}" state: directory mode: 0755 - name: Unarchive helm charts on infra node unarchive: src: "{{ app_helm_charts_install_directory }}.tgz" dest: "{{ app_helm_charts_infra_directory }}" - include_tasks: install-helm2-plugins.yml when: helm_version | regex_search("^v2" ) - include_tasks: install-helm3-plugins.yml when: helm_version | regex_search("^v3" )