summaryrefslogtreecommitdiffstats
path: root/ansible/roles/application-install/tasks/main.yml
blob: ba5227920a7c27553d0eafcb21b389b52ed61466 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
---
- 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: "{{ true if charts_files.matched | int > 0 else false }}"
  when: phase == "pre-install"

- include_tasks: "{{ phase }}.yml"
  when: install_needed

- debug:
    msg: "Install needed {{ install_needed }}"