2 - name: Install helm plugins if needed
4 - name: Get helm environment information
5 command: "{{ helm_bin_dir }}/helm env"
7 - name: Set helm data dir
10 "{% if 'HELM_DATA_HOME' in helm_env.stdout -%}
11 {{ (helm_env.stdout | replace('\"', '') | regex_search('HELM_DATA_HOME.*')).split('=')[1] }}
13 {{ '~/.local/share/helm' }}
15 - name: Ensure that dir for helm plugins exists
17 path: "{{ helm_data_dir }}/plugins"
20 - name: Register all plugins to be inserted by dir names
22 paths: "{{ app_helm_plugins_directory }}"
23 file_type: "directory"
24 register: list_of_plugins
25 delegate_to: localhost
26 - name: Install all helm plugins from {{ app_helm_plugins_directory }} dir
28 src: "{{ item.path }}"
29 dest: "{{ helm_data_dir }}/plugins"
32 loop: "{{ list_of_plugins.files }}"
33 when: app_helm_plugins_directory is defined and app_helm_plugins_directory is not none