From e2c7b1305ca8495065dcf40fd2092d7c698dd6ea Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Tue, 20 Mar 2018 15:47:51 +0100 Subject: Local volumes and StatefulSet to provision Master/Slave MySQL and Galera cluster --- roles/ands_kaas/tasks/do_storage.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'roles/ands_kaas/tasks/do_storage.yml') diff --git a/roles/ands_kaas/tasks/do_storage.yml b/roles/ands_kaas/tasks/do_storage.yml index ee118fd..e79db56 100644 --- a/roles/ands_kaas/tasks/do_storage.yml +++ b/roles/ands_kaas/tasks/do_storage.yml @@ -18,8 +18,18 @@ volume: "{{osv.value}}" when: - ( mntpath | length ) > 0 - - (osv.type | default("host")) in [ "host" ] + - (kaas_storage_types is not defined) or ((osv.type | default("host")) in kaas_storage_types) +- name: Check if static configuration exists + local_action: stat path="{{ kaas_project_path }}/files/" + register: result + +# Executed only if complete project is provisioned (not if we just care to provision per-node storage) +- name: Search static configuration + include_tasks: search.yml + when: + - result.stat.exists + - kaas_storage_types is not defined - name: Configure KaaS files include_tasks: file.yml @@ -40,4 +50,4 @@ hostpath: "{{ hostvars[inventory_hostname][hvar] }}/{{ file.path }}" when: - file.osv in kaas_project_volumes - - (osv.type | default("host")) in [ "host" ] + - (kaas_storage_types is not defined) or ((osv.type | default("host")) in kaas_storage_types) -- cgit v1.2.3