[MOLECULE] Drop custom helm3 scenario for application role
[oom/offline-installer.git] / ansible / roles / application / tasks / install-helm2-plugins.yml
1 ---
2 - name: Install helm plugins if needed
3   block:
4     - name: Get helm dir
5       command: "{{ helm_bin_dir }}/helm home"
6       register: helm_home_dir
7     - name: Ensure that dir for helm plugins exists
8       file:
9         path: "{{ helm_home_dir.stdout }}/plugins"
10         state: directory
11         mode: 0755
12     - name: Register all plugins to be inserted by dir names
13       find:
14         paths: "{{ app_helm_plugins_directory }}"
15         file_type: "directory"
16       register: list_of_plugins
17       delegate_to: localhost
18     - name: Install all helm plugins from {{ app_helm_plugins_directory }} dir
19       copy:
20         src: "{{ item.path }}"
21         dest: "{{ helm_home_dir.stdout }}/plugins"
22         directory_mode: true
23         mode: 0755
24       loop: "{{ list_of_plugins.files }}"
25   when: app_helm_plugins_directory is defined and app_helm_plugins_directory is not none