summaryrefslogtreecommitdiffstats
path: root/ansible/roles/application/tasks/install-helm2-plugins.yml
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/application/tasks/install-helm2-plugins.yml')
-rw-r--r--ansible/roles/application/tasks/install-helm2-plugins.yml25
1 files changed, 25 insertions, 0 deletions
diff --git a/ansible/roles/application/tasks/install-helm2-plugins.yml b/ansible/roles/application/tasks/install-helm2-plugins.yml
new file mode 100644
index 00000000..f1f900e3
--- /dev/null
+++ b/ansible/roles/application/tasks/install-helm2-plugins.yml
@@ -0,0 +1,25 @@
+---
+- name: Install helm plugins if needed
+ block:
+ - name: Get helm dir
+ command: "{{ helm_bin_dir }}/helm home"
+ register: helm_home_dir
+ - name: Ensure that dir for helm plugins exists
+ file:
+ path: "{{ helm_home_dir.stdout }}/plugins"
+ state: directory
+ mode: 0755
+ - name: Register all plugins to be inserted by dir names
+ find:
+ paths: "{{ app_helm_plugins_directory }}"
+ file_type: "directory"
+ register: list_of_plugins
+ delegate_to: localhost
+ - name: Install all helm plugins from {{ app_helm_plugins_directory }} dir
+ copy:
+ src: "{{ item.path }}"
+ dest: "{{ helm_home_dir.stdout }}/plugins"
+ directory_mode: true
+ mode: 0755
+ loop: "{{ list_of_plugins.files }}"
+ when: app_helm_plugins_directory is defined and app_helm_plugins_directory is not none