{%- if grains['role'] == 'so-eval' -%}
{%- set ES = salt['pillar.get']('manager:mainip', '') -%}
{%- else %}
{%- set ES = salt['pillar.get']('elasticsearch:mainip', '') -%}
{%- endif %}
output {
  if [event_type] == "ids" and "import" not in [tags] {
    elasticsearch {
      hosts => "{{ ES }}"
      index => "so-ids"
      template_name => "so-ids"
      template => "/templates/so-ids-template.json"
      template_overwrite => true
      ssl => true
      ssl_certificate_verification => false
    }
  }
}
