From 27cd17a5b41c1cc93dbd84c12f571aa176f99ed2 Mon Sep 17 00:00:00 2001 From: ewolinetz Date: Thu, 11 May 2017 14:30:41 -0500 Subject: fixing available variables for 2.3.0 --- roles/openshift_logging/tasks/install_logging.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'roles/openshift_logging') diff --git a/roles/openshift_logging/tasks/install_logging.yaml b/roles/openshift_logging/tasks/install_logging.yaml index da00ba34d..536d1281d 100644 --- a/roles/openshift_logging/tasks/install_logging.yaml +++ b/roles/openshift_logging/tasks/install_logging.yaml @@ -52,6 +52,10 @@ - set_fact: es_indices={{ es_indices | default([]) + [item | int - 1] }} with_sequence: count={{ openshift_logging_facts.elasticsearch.deploymentconfigs.keys() | count }} + when: openshift_logging_facts.elasticsearch.deploymentconfigs.keys() | count > 0 + +- set_fact: es_indices=[] + when: openshift_logging_facts.elasticsearch.deploymentconfigs.keys() | count == 0 # TODO: add more vars # We don't allow scaling down of ES nodes currently @@ -94,6 +98,10 @@ with_sequence: count={{ openshift_logging_facts.elasticsearch_ops.deploymentconfigs.keys() | count }} when: - openshift_logging_use_ops | bool + - openshift_logging_facts.elasticsearch_ops.deploymentconfigs.keys() | count > 0 + +- set_fact: es_ops_indices=[] + when: openshift_logging_facts.elasticsearch_ops.deploymentconfigs.keys() | count == 0 # TODO: add more vars - include_role: -- cgit v1.2.3