summaryrefslogtreecommitdiffstats
path: root/roles/ands_kaas/tasks/do_storage.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/ands_kaas/tasks/do_storage.yml')
-rw-r--r--roles/ands_kaas/tasks/do_storage.yml14
1 files changed, 12 insertions, 2 deletions
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)