{%- if grains['role'] == 'so-eval' -%}
{%- set ES = salt['pillar.get']('manager:mainip', '') -%}
{%- else %}
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
{%- endif %}
output {
  if [module] =~ "strelka" {
    elasticsearch {
      pipeline => "%{module}.%{dataset}" 
      hosts => "{{ ES }}"
      index => "so-strelka"
      template_name => "so-strelka"
      template => "/templates/so-strelka-template.json"
      template_overwrite => true
      ssl => true
      ssl_certificate_verification => false
    }
  }
}

