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