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: |
Milan Verespej | c8268a0 | 2019-02-14 14:21:14 +0100 | [diff] [blame] | 15 | install_needed: "{{ true if charts_files.matched | int > 0 else false }}" |
Samuli Silvius | fe11111 | 2019-02-05 09:45:24 +0200 | [diff] [blame] | 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 }}" |