summaryrefslogtreecommitdiffstats
path: root/ansible/roles/application-install/tasks
diff options
context:
space:
mode:
authorMichal Ptacek <m.ptacek@partner.samsung.com>2019-02-05 20:14:49 +0000
committerGerrit Code Review <gerrit@onap.org>2019-02-05 20:14:49 +0000
commit1f264b4f471e3570b8b541af7be9a2d300f7c930 (patch)
tree172f4872349fe526870c2f2f52d0fed313dbf9fc /ansible/roles/application-install/tasks
parent418db4d1b6704c70b18aa5875d1fa9078c773631 (diff)
parentfabcad6e62cab4e4b53e3f7c7f65db323676ce99 (diff)
Merge "Fixing missing clause for enabling helm deploy"
Diffstat (limited to 'ansible/roles/application-install/tasks')
-rw-r--r--ansible/roles/application-install/tasks/install.yml14
-rw-r--r--ansible/roles/application-install/tasks/pre-install.yml2
2 files changed, 13 insertions, 3 deletions
diff --git a/ansible/roles/application-install/tasks/install.yml b/ansible/roles/application-install/tasks/install.yml
index d385b448..eaa40ce2 100644
--- a/ansible/roles/application-install/tasks/install.yml
+++ b/ansible/roles/application-install/tasks/install.yml
@@ -38,5 +38,15 @@
environment:
PATH: "{{ helm_bin_dir }}:{{ ansible_env.PATH }}"
-- name: Helm Install application {{ app_name }}
- command: "{{ helm_bin_dir }}/helm install {{ helm_repository_name }}/{{ app_helm_chart_name }} --name {{ app_helm_release_name }} --namespace {{ app_kubernetes_namespace }}"
+- name: Check for deploy plugin presence
+ stat:
+ path: '~/.helm/plugins/deploy/deploy.sh'
+ register: deploy_plugin_presence
+
+- name: "Helm Install application {{ app_name }}"
+ command: >
+ {{ helm_bin_dir }}/helm
+ {{ 'deploy' if deploy_plugin_presence.stat.exists else 'install --name' }}
+ {{ app_helm_release_name }}
+ {{ helm_repository_name }}/{{ app_helm_chart_name }}
+ --namespace {{ app_kubernetes_namespace }}
diff --git a/ansible/roles/application-install/tasks/pre-install.yml b/ansible/roles/application-install/tasks/pre-install.yml
index 88a95ea6..3d63cb55 100644
--- a/ansible/roles/application-install/tasks/pre-install.yml
+++ b/ansible/roles/application-install/tasks/pre-install.yml
@@ -38,7 +38,7 @@
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."
+- name: "Execute custom role {{ application_pre_install_role }} if defined."
include_tasks: custom_role.yml
vars:
application_custom_role: "{{ application_pre_install_role }}"