26 lines
838 B
Django/Jinja
26 lines
838 B
Django/Jinja
## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
|
|
{%- from "vector/map.jinja" import vector with context %}
|
|
|
|
{% macro cfg(value) -%}
|
|
{% if value -%}
|
|
{% for paramname, paramvalue in value.items() -%}
|
|
{{ ' ' }}{{ paramname }} = {% if paramvalue is sameas True or paramvalue is sameas False %}{{ paramvalue|string|lower }}{% elif paramvalue is iterable and paramvalue is not string %}[{{ paramvalue|join(",") }}]{% else %}"{{ paramvalue }}"{% endif %}
|
|
{% endfor %}
|
|
{%- endif %}
|
|
{%- endmacro %}
|
|
|
|
{% for name, value in vector.config.sources.items() -%}
|
|
[sources.{{ name }}]
|
|
{{ cfg(value) }}
|
|
{% endfor %}
|
|
|
|
{% for name, value in vector.config.transforms.items() -%}
|
|
[transforms.{{ name }}]
|
|
{{ cfg(value) }}
|
|
{% endfor -%}
|
|
|
|
{% for name, value in vector.config.sinks.items() -%}
|
|
[sinks.{{ name }}]
|
|
{{ cfg(value) }}
|
|
{% endfor -%}
|