{% import 'vars/init.map.jinja' as INIT %}

{%
  set ELASTICSEARCH_GLOBALS = {
    'elasticsearch': {
      'es_cluster_name': INIT.PILLAR.elasticsearch.config.cluster.name,
      'es_heap': INIT.PILLAR.elasticsearch.esheap
    }
  }
%}

{% if salt['file.file_exists']('/opt/so/saltstack/local/pillar/elasticsearch/auth.sls') %}
{%   do ELASTICSEARCH_GLOBALS.elasticsearch.update({'auth': INIT.PILLAR.elasticsearch.auth}) %}
{% endif %}
