Browse Source

fix negative stride encountered from openshift_logging

Jeff Cantrill 8 years ago
parent
commit
771699023d
1 changed files with 4 additions and 4 deletions
  1. 4 4
      roles/openshift_logging/tasks/install_elasticsearch.yaml

+ 4 - 4
roles/openshift_logging/tasks/install_elasticsearch.yaml

@@ -17,13 +17,13 @@
 
 # This should be used to generate new DC names if necessary
 - name: Create new DeploymentConfig names for Elasticsearch
-  set_fact: es_dc_pool={{es_dc_pool + [deploy_name]}}
+  set_fact: es_dc_pool={{es_dc_pool|default([]) + [deploy_name]}}
   vars:
     component: es
     es_cluster_name: "{{component}}"
     deploy_name_prefix: "logging-{{component}}"
     deploy_name: "{{deploy_name_prefix}}-{{'abcdefghijklmnopqrstuvwxyz0123456789'|random_word(8)}}"
-  with_sequence: count={{ openshift_logging_current_es_size | int - openshift_logging_es_cluster_size | int }}
+  with_sequence: count={{ openshift_logging_es_cluster_size | int - openshift_logging_current_es_size | int }}
   check_mode: no
 
 - name: Generate Elasticsearch DeploymentConfig
@@ -83,14 +83,14 @@
     - openshift_logging_use_ops
 
 - name: Create new DeploymentConfig names for Elasticsearch Ops
-  set_fact: es_ops_dc_pool={{es_ops_dc_pool + [deploy_name]}}
+  set_fact: es_ops_dc_pool={{es_ops_dc_pool | default([]) + [deploy_name]}}
   vars:
     component: es-ops
     es_cluster_name: "{{component}}"
     deploy_name_prefix: "logging-{{component}}"
     deploy_name: "{{deploy_name_prefix}}-{{'abcdefghijklmnopqrstuvwxyz0123456789'|random_word(8)}}"
     cluster_size: "{{openshift_logging_es_ops_cluster_size}}"
-  with_sequence: count={{ openshift_logging_current_es_ops_size | int - openshift_logging_es_ops_cluster_size | int }}
+  with_sequence: count={{ openshift_logging_es_ops_cluster_size | int - openshift_logging_current_es_ops_size | int }}
   when:
     - openshift_logging_use_ops
   check_mode: no