2101a5abfc8384ac98ed5351c2968324744940c8
[oom/offline-installer.git] / ansible / roles / application / tasks / transfer-helm-charts.yml
1 ---
2 # before custom specific code is executed we need to move helm charts to infra
3 - name: Distribute helm charts to infra node
4   block:
5     - name: Archive helm charts
6       command: tar -cvzf {{ app_helm_charts_install_directory }}.tgz -C {{ app_helm_charts_install_directory }} .
7       args:
8         warn: false
9       tags:
10         - skip_ansible_lint  # Prevent '[303] tar used in place of unarchive module'
11       changed_when: false  # for idempotency
12       delegate_to: localhost
13     - name: Create helm charts dir on infra
14       file:
15         path: "{{ app_helm_charts_infra_directory }}"
16         state: directory
17         mode: 0755
18     - name: Unarchive helm charts on infra node
19       unarchive:
20         src: "{{ app_helm_charts_install_directory }}.tgz"
21         dest: "{{ app_helm_charts_infra_directory }}"
22
23 - include_tasks: install-helm2-plugins.yml
24   when: helm_version | regex_search("^v2" )
25 - include_tasks: install-helm3-plugins.yml
26   when: helm_version | regex_search("^v3" )