# {{ ansible_managed }}

{% for loggable in SPLUNKFORWARDER_LOG_ITEMS%}
[monitor://{{ loggable.source }}]
blacklist = \.(gz)$
{% if loggable.recursive | default(False) %}
{# There's a bug in which "recursive" must be unset for logs to be forwarded #}
{# See https://answers.splunk.com/answers/420901/splunk-not-matching-files-with-wildcard-in-monitor.html #}
recursive = true
{% endif %}
{% if loggable.sourcetype is defined %}
sourcetype = {{ loggable.sourcetype }}
{% endif %}
{% if loggable.index is defined %}
index = {{ loggable.index }}
{% endif %}
{% if loggable._TCP_ROUTING is defined %}
_TCP_ROUTING = {{ loggable._TCP_ROUTING }}
{% endif %}
{% if loggable.followSymlink is defined %}
followSymlink = {{ loggable.followSymlink }}
{% endif %}
{% if loggable.crcSalt is defined %}
crcSalt = {{ loggable.crcSalt }}
{% endif %}
{% endfor %}
