From 0b0b9954c2d0602b1e9d0a387d2a195a790f8084 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Thu, 22 Mar 2018 04:37:46 +0100 Subject: Various fixes and provide ADEI admin container... --- roles/ands_kaas/tasks/do_apps.yml | 2 +- roles/ands_kaas/tasks/do_storage.yml | 4 ++-- roles/ands_kaas/tasks/project.yml | 2 +- roles/ands_kaas/tasks/template.yml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'roles/ands_kaas') diff --git a/roles/ands_kaas/tasks/do_apps.yml b/roles/ands_kaas/tasks/do_apps.yml index 39283b4..0e49981 100644 --- a/roles/ands_kaas/tasks/do_apps.yml +++ b/roles/ands_kaas/tasks/do_apps.yml @@ -1,7 +1,7 @@ - name: "Process KaaS apps" include_tasks: "template.yml" run_once: true - with_dict: "{{ kaas_project_apps }}" + with_dict: "{{ kaas_project_apps | default({}) }}" loop_control: loop_var: appitem when: diff --git a/roles/ands_kaas/tasks/do_storage.yml b/roles/ands_kaas/tasks/do_storage.yml index e79db56..8a6a880 100644 --- a/roles/ands_kaas/tasks/do_storage.yml +++ b/roles/ands_kaas/tasks/do_storage.yml @@ -18,7 +18,7 @@ volume: "{{osv.value}}" when: - ( mntpath | length ) > 0 - - (kaas_storage_types is not defined) or ((osv.type | default("host")) in kaas_storage_types) + - (kaas_storage_types is not defined) or (voltype in kaas_storage_types) - name: Check if static configuration exists local_action: stat path="{{ kaas_project_path }}/files/" @@ -50,4 +50,4 @@ hostpath: "{{ hostvars[inventory_hostname][hvar] }}/{{ file.path }}" when: - file.osv in kaas_project_volumes - - (kaas_storage_types is not defined) or ((osv.type | default("host")) in kaas_storage_types) + - (kaas_storage_types is not defined) or (voltype in kaas_storage_types) diff --git a/roles/ands_kaas/tasks/project.yml b/roles/ands_kaas/tasks/project.yml index 26bd0cc..879f34a 100644 --- a/roles/ands_kaas/tasks/project.yml +++ b/roles/ands_kaas/tasks/project.yml @@ -59,7 +59,7 @@ kaas_project_volumes: "{{ kaas_project_config.volumes | default(kaas_project_config.extra_volumes | default({}) | combine(kaas_openshift_volumes)) }}" kaas_project_local_volumes: "{{ kaas_project_config.local_volumes | default({}) }}" kaas_project_pods: "{{ kaas_project_config.pods | default({}) }}" - kaas_project_apps: "{{ kaas_project_config.apps | default([]) }}" + kaas_project_apps: "{{ kaas_project_config.apps | default({}) }}" kaas_project_gids: "{{ kaas_project_config.gids | default(kaas_openshift_gids) }}" kaas_project_uids: "{{ kaas_project_config.uids | default(kaas_openshift_uids) }}" kaas_blockvol_info: "{{ block_info }}" diff --git a/roles/ands_kaas/tasks/template.yml b/roles/ands_kaas/tasks/template.yml index 87e45a6..841c80e 100644 --- a/roles/ands_kaas/tasks/template.yml +++ b/roles/ands_kaas/tasks/template.yml @@ -20,8 +20,8 @@ template: "{{ dest_name }}" template_path: "{{ kaas_template_path }}" project: "{{ kaas_project }}" - recreate: "{{ result | changed | ternary (delete | ternary(true, false), false) }}" - replace: "{{ result | changed | ternary (delete | ternary(false, true), false) }}" + recreate: "{{ result | changed | ternary (delete | default(true) | ternary(true, false), false) }}" + replace: "{{ result | changed | ternary (delete | default(true) | ternary(false, true), false) }}" # alternatively load template # TODO -- cgit v1.2.3