2 # before custom specific code is executed we need to move helm charts to infra
3 - name: Distribute helm charts to infra node
5 - name: Archive helm charts
7 path: "{{ app_helm_charts_install_directory }}/*"
8 dest: "{{ app_helm_charts_install_directory }}.tgz"
10 - name: Create helm charts dir on infra
12 path: "{{ app_helm_charts_infra_directory }}"
15 - name: Unarchive helm charts on infra node
17 src: "{{ app_helm_charts_install_directory }}.tgz"
18 dest: "{{ app_helm_charts_infra_directory }}"
21 - name: Install helm plugins if needed
24 command: "{{ helm_bin_dir }}/helm home"
25 register: helm_home_dir
26 - name: Ensure that dir for helm plugins exists
28 path: "{{ helm_home_dir.stdout }}/plugins"
31 - name: Register all plugins to be inserted by dir names
33 paths: "{{ app_helm_plugins_directory }}"
34 file_type: "directory"
35 register: list_of_plugins
36 delegate_to: localhost
37 - name: Install all helm plugins from {{ app_helm_plugins_directory }} dir
39 src: "{{ item.path }}"
40 dest: "{{ helm_home_dir.stdout }}/plugins"
43 with_items: "{{ list_of_plugins.files }}"
44 when: app_helm_plugins_directory is defined and app_helm_plugins_directory is not none