diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2018-02-28 23:46:55 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2018-02-28 23:46:55 +0100 |
commit | 1f3e2a9f59e83dc3f0fcbecf096a7e7b40d36ed7 (patch) | |
tree | c75d04456ab3593442734bec3d84c90e4b973f27 /roles/ands_kaas/tasks/do_project.yml | |
parent | fe4622305efa55e6bec8221efe8fc4bdd5462136 (diff) | |
download | ands-1f3e2a9f59e83dc3f0fcbecf096a7e7b40d36ed7.tar.gz ands-1f3e2a9f59e83dc3f0fcbecf096a7e7b40d36ed7.tar.bz2 ands-1f3e2a9f59e83dc3f0fcbecf096a7e7b40d36ed7.tar.xz ands-1f3e2a9f59e83dc3f0fcbecf096a7e7b40d36ed7.zip |
First running prototype
Diffstat (limited to 'roles/ands_kaas/tasks/do_project.yml')
-rw-r--r-- | roles/ands_kaas/tasks/do_project.yml | 13 |
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 != {} |