diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2019-08-28 23:24:34 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2019-08-28 23:24:34 +0200 |
commit | 79e60f2f201e1330a2716825dac985abb7a2bef0 (patch) | |
tree | 2790baf96cbdd9b040c3f18a52cd1a8aed63bdd1 | |
parent | fcc988835ce49dee4ce376565a9f643a165de74e (diff) | |
download | ands-79e60f2f201e1330a2716825dac985abb7a2bef0.tar.gz ands-79e60f2f201e1330a2716825dac985abb7a2bef0.tar.bz2 ands-79e60f2f201e1330a2716825dac985abb7a2bef0.tar.xz ands-79e60f2f201e1330a2716825dac985abb7a2bef0.zip |
Create application template if instantination is disabeld
-rw-r--r-- | roles/ands_kaas/tasks/do_app.yml | 4 | ||||
-rw-r--r-- | roles/ands_kaas/tasks/do_apps.yml | 2 | ||||
-rw-r--r-- | roles/ands_kaas/tasks/template.yml | 1 | ||||
-rw-r--r-- | roles/openshift_resource/tasks/main.yml | 4 |
4 files changed, 5 insertions, 6 deletions
diff --git a/roles/ands_kaas/tasks/do_app.yml b/roles/ands_kaas/tasks/do_app.yml index 556a421..c653b6d 100644 --- a/roles/ands_kaas/tasks/do_app.yml +++ b/roles/ands_kaas/tasks/do_app.yml @@ -3,11 +3,11 @@ run_once: true vars: tmpl_name: "40-kaas-app-builders.yml.j2" - yml_name: ternary ( '80-' + (appname | default('kaas')) + '-builder.yml' + yml_name: "{{ '80-' + (appname | default('kaas')) + '-builder.yml' }}" - name: "Process KaaS App pods" include_tasks: "template.yml" run_once: true vars: tmpl_name: "50-kaas-app-pods.yml.j2" - yml_name: ternary ( '90-' + (appname | default('kaas')) + '.yml' + yml_name: "{{ '90-' + (appname | default('kaas')) + '.yml' }}" diff --git a/roles/ands_kaas/tasks/do_apps.yml b/roles/ands_kaas/tasks/do_apps.yml index 382eb3c..ffcecfe 100644 --- a/roles/ands_kaas/tasks/do_apps.yml +++ b/roles/ands_kaas/tasks/do_apps.yml @@ -1,5 +1,5 @@ - name: "Process KaaS apps" - include_tasks: "app.yml" + include_tasks: "do_app.yml" run_once: true with_dict: "{{ kaas_project_apps | default({}) }}" loop_control: diff --git a/roles/ands_kaas/tasks/template.yml b/roles/ands_kaas/tasks/template.yml index 73cf1c4..a12b192 100644 --- a/roles/ands_kaas/tasks/template.yml +++ b/roles/ands_kaas/tasks/template.yml @@ -13,7 +13,6 @@ - name: "Configure KaaS resources defined in {{ tmpl_name }}" include_role: name="openshift_resource" - when: instantiate == true vars: default_name: "{{ tmpl_name | basename | regex_replace('\\.j2','') }}" dest_name: "{{ yml_name | default(default_name) }}" diff --git a/roles/openshift_resource/tasks/main.yml b/roles/openshift_resource/tasks/main.yml index 086ab2b..5dcc894 100644 --- a/roles/openshift_resource/tasks/main.yml +++ b/roles/openshift_resource/tasks/main.yml @@ -19,7 +19,7 @@ vars: metadata: "{{ tmpl.metadata | default({}) }}" annotations: "{{ metadata.annotations | default({}) }}" - strategy: "{{ annotations['kaas/strategy'] | default('auto') }}" + strategy: "{{ instantiate | default(true) | ternary (annotations['kaas/strategy'] | default('auto'), 'manual') }}" when: - tmpl.kind == "Template" - strategy == "auto" @@ -30,7 +30,7 @@ vars: metadata: "{{ tmpl.metadata | default({}) }}" annotations: "{{ metadata.annotations | default({}) }}" - strategy: "{{ annotations['kaas/strategy'] | default('auto') }}" + strategy: "{{ instantiate | default(true) | ternary (annotations['kaas/strategy'] | default('auto'), 'manual') }}" when: (tmpl.kind != "Template") or (strategy != "auto") # when: results | skipped |