{% if item.filter is defined %}
{% if item.filter.name is defined %}
[outputs.{{ item.type }}.{{ item.filter.name }}]
{% if item.filter.config is defined and item.filter.config is iterable %}
{% for items in item.filter.config %}
{{ items }}
{% endfor %}
{% endif %}
{% endif %}
{% endif %}
many output agent need filters. For instance see at output.http.headers in output http plugin
https://github.com/dj-wasabi/ansible-telegraf/blob/8e4b34d4bddd732e150faa6f971cce9392b2a2fb/templates/telegraf.conf.j2#L63
here you should add
many output agent need filters. For instance see at output.http.headers in output http plugin