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.yml20
1 files changed, 18 insertions, 2 deletions
diff --git a/roles/ands_kaas/tasks/do_project.yml b/roles/ands_kaas/tasks/do_project.yml
index 5cafe25..f5b3276 100644
--- a/roles/ands_kaas/tasks/do_project.yml
+++ b/roles/ands_kaas/tasks/do_project.yml
@@ -10,11 +10,16 @@
loop_control:
loop_var: osv
vars:
- query: "[*].volumes.{{osv.value.volume}}.mount"
- mntpath: "{{ (ands_storage_domains | json_query(query)) }}"
+ vt_query: "[*].volumes.{{osv.value.volume}}.type"
+ voltype: "{{ (kaas_storage_domains | json_query(vt_query)) }}"
+ mp_query: "[*].volumes.{{osv.value.volume}}.mount"
+ mntpath: "{{ (kaas_storage_domains | json_query(mp_query)) }}"
+ rp_query: "[*].volumes.{{osv.value.volume}}.path"
+ realpath: "{{ (kaas_storage_domains | json_query(rp_query)) }}"
osvpath: "{{ osv.value.path | default('') }}"
prefix: "{{ ( osvpath[:1] == '/' ) | ternary('', '/' ~ kaas_project ~ '/') }}"
path: "{{ mntpath[0] ~ prefix ~ osvpath }}"
+ hostpath: "{{ realpath[0] is defined | ternary((realpath[0] | default('')) ~ prefix ~ osvpath, '') }}"
name: "{{osv.key}}"
volume: "{{osv.value}}"
when: ( mntpath | length ) > 0
@@ -35,8 +40,17 @@
loop_control:
loop_var: file
vars:
+ osv: "{{ kaas_project_volumes[file.osv] }}"
+ vt_query: "[*].volumes.{{osv.volume}}.type"
+ voltype: "{{ (kaas_storage_domains | json_query(vt_query)) }}"
+ mp_query: "[*].volumes.{{osv.volume}}.mount"
+ mntpath: "{{ (kaas_storage_domains | json_query(mp_query)) }}"
+ rp_query: "[*].volumes.{{osv.volume}}.path"
+ realpath: "{{ (kaas_storage_domains | json_query(rp_query)) }}"
pvar: "kaas_{{ file.osv }}_path"
path: "{{ hostvars[inventory_hostname][pvar] }}/{{ file.path }}"
+ hvar: "kaas_{{ file.osv }}_hostpath"
+ hostpath: "{{ hostvars[inventory_hostname][hvar] }}/{{ file.path }}"
when: file.osv in kaas_project_volumes
- name: Load OpenSSL keys
@@ -60,3 +74,5 @@
when:
- kaas_project_config.oc is undefined
+- name: Install Applications
+ include_tasks: do_apps.yml