diff options
author | 2019-01-28 16:18:26 +0000 | |
---|---|---|
committer | 2019-01-28 16:18:26 +0000 | |
commit | fc3bb8f8c1c73f99b4e9d2b5d12f0870998f7569 (patch) | |
tree | 52473b594455a29f9f32e29c934c26f4a0eabaac /ansible/roles/application-install/tasks/pre-install.yml | |
parent | 2f1f94848beb2af4bb355872986cde78f40e177e (diff) | |
parent | 271cf3ffc2977f9e4825842a953b9a8e3ab27141 (diff) |
Merge "Adding support for helm plugins"
Diffstat (limited to 'ansible/roles/application-install/tasks/pre-install.yml')
-rw-r--r-- | ansible/roles/application-install/tasks/pre-install.yml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ansible/roles/application-install/tasks/pre-install.yml b/ansible/roles/application-install/tasks/pre-install.yml index b782ca76..88a95ea6 100644 --- a/ansible/roles/application-install/tasks/pre-install.yml +++ b/ansible/roles/application-install/tasks/pre-install.yml @@ -17,7 +17,29 @@ src: "{{ app_helm_charts_install_directory }}.tgz" dest: "{{ app_helm_charts_infra_directory }}" + +- name: Install helm plugins if needed + block: + - name: Ensure that dir for helm plugins exists + file: + path: "~/.helm/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 + - name: Install all helm plugins from {{ app_helm_plugins_directory }} dir + command: "{{ helm_bin_dir }}/helm plugin install {{ item.path }}" + with_items: "{{ list_of_plugins.files }}" + register: helm_plugin_install_result + failed_when: "helm_plugin_install_result.rc > 0 and helm_plugin_install_result.stderr != 'Error: plugin already exists'" + become: true + when: app_helm_plugins_directory is defined and app_helm_plugins_directory is not none + - name: "Execute custome role {{ application_pre_install_role }} if defined." include_tasks: custom_role.yml vars: application_custom_role: "{{ application_pre_install_role }}" + |