Tomas Levora | 5ea00a9 | 2018-12-19 14:36:36 +0100 | [diff] [blame] | 1 | --- |
| 2 | - debug: |
| 3 | msg: "phase is {{ phase }}" |
| 4 | |
Samuli Silvius | fe11111 | 2019-02-05 09:45:24 +0200 | [diff] [blame] | 5 | - name: Check if install needed |
| 6 | block: |
| 7 | - name: "Does {{ app_helm_charts_install_directory }} exist and contain Helm Charts" |
| 8 | find: |
| 9 | paths: "{{ app_helm_charts_install_directory }}" |
| 10 | recurse: yes |
| 11 | delegate_to: localhost |
| 12 | register: charts_files |
| 13 | - name: Set install active fact |
| 14 | set_fact: |
| 15 | install_needed: "{{ yes if charts_files.matched | int > 0 else no }}" |
| 16 | when: phase == "pre-install" |
| 17 | |
Tomas Levora | 5ea00a9 | 2018-12-19 14:36:36 +0100 | [diff] [blame] | 18 | - include_tasks: "{{ phase }}.yml" |
Samuli Silvius | fe11111 | 2019-02-05 09:45:24 +0200 | [diff] [blame] | 19 | when: install_needed |
| 20 | |
| 21 | - debug: |
| 22 | msg: "Install needed {{ install_needed }}" |