summaryrefslogtreecommitdiffstats
path: root/roles/ands_kaas/tasks/do_project.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/ands_kaas/tasks/do_project.yml')
-rw-r--r--roles/ands_kaas/tasks/do_project.yml13
1 files changed, 7 insertions, 6 deletions
diff --git a/roles/ands_kaas/tasks/do_project.yml b/roles/ands_kaas/tasks/do_project.yml
index a876d94..4fac6c6 100644
--- a/roles/ands_kaas/tasks/do_project.yml
+++ b/roles/ands_kaas/tasks/do_project.yml
@@ -6,13 +6,15 @@
include_tasks: volume.yml
run_once: true
# delegate_to: "{{ groups.masters[0] }}"
- with_dict: "{{ kaas_project_config.volumes | default(kaas_openshift_volumes) }}"
+ with_dict: "{{ kaas_project_volumes }}"
loop_control:
loop_var: osv
vars:
query: "[*].volumes.{{osv.value.volume}}.mount"
mntpath: "{{ (ands_storage_domains | json_query(query)) }}"
- path: "{{ mntpath[0] ~ (osv.value.path | default('')) }}"
+ osvpath: "{{ osv.value.path | default('') }}"
+ prefix: "{{ ( osvpath[:1] == '/' ) | ternary('', '/' ~ kaas_project ~ '/') }}"
+ path: "{{ mntpath[0] ~ prefix ~ osvpath }}"
name: "{{osv.key}}"
volume: "{{osv.value}}"
when: ( mntpath | length ) > 0
@@ -29,19 +31,19 @@
include_tasks: file.yml
run_once: true
# delegate_to: "{{ groups.masters[0] }}"
- with_items: "{{ kaas_project_config.files | default(ands_openshift_files) }}"
+ with_items: "{{ kaas_project_config.files | default(kaas_openshift_files) | default([]) }}"
loop_control:
loop_var: file
vars:
pvar: "kaas_{{ file.osv }}_path"
path: "{{ hostvars[inventory_hostname][pvar] }}/{{ file.path }}"
- when: file.osv in ( kaas_project_config.volumes | default(kaas_openshift_volumes) )
+ when: file.osv in kaas_project_volumes
- name: Load OpenSSL keys
include_tasks: keys.yml
# delegate_to: "{{ groups.masters[0] }}"
run_once: true
- with_dict: "{{ kaas_project_config.pods }}"
+ with_dict: "{{ kaas_project_config.pods | default({}) }}"
loop_control:
loop_var: pod
@@ -57,5 +59,4 @@
run_once: true
when:
- kaas_project_config.oc is undefined
- - kaas_project_config.pods != {}