summaryrefslogtreecommitdiffstats
path: root/ansible/roles/application-install/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/application-install/tasks/main.yml')
-rw-r--r--ansible/roles/application-install/tasks/main.yml17
1 files changed, 17 insertions, 0 deletions
diff --git a/ansible/roles/application-install/tasks/main.yml b/ansible/roles/application-install/tasks/main.yml
index 3306d9e4..89e7ef7e 100644
--- a/ansible/roles/application-install/tasks/main.yml
+++ b/ansible/roles/application-install/tasks/main.yml
@@ -2,4 +2,21 @@
- debug:
msg: "phase is {{ phase }}"
+- name: Check if install needed
+ block:
+ - name: "Does {{ app_helm_charts_install_directory }} exist and contain Helm Charts"
+ find:
+ paths: "{{ app_helm_charts_install_directory }}"
+ recurse: yes
+ delegate_to: localhost
+ register: charts_files
+ - name: Set install active fact
+ set_fact:
+ install_needed: "{{ yes if charts_files.matched | int > 0 else no }}"
+ when: phase == "pre-install"
+
- include_tasks: "{{ phase }}.yml"
+ when: install_needed
+
+- debug:
+ msg: "Install needed {{ install_needed }}"