2022-01-15 18:52:57 +01:00
|
|
|
# {{ ansible_managed }}
|
|
|
|
|
2022-01-15 18:25:03 +01:00
|
|
|
# Set global options
|
|
|
|
data_dir = "/var/lib/vector"
|
|
|
|
|
2022-01-15 18:52:57 +01:00
|
|
|
[api]
|
|
|
|
enabled = true
|
|
|
|
address = "0.0.0.0:8686"
|
|
|
|
|
2022-01-15 18:25:03 +01:00
|
|
|
{% set loop_helper = {
|
|
|
|
"sources": (sources | default({})),
|
|
|
|
"transforms": (transforms | default({})),
|
|
|
|
"sinks": (sinks | default({}))
|
|
|
|
} %}
|
|
|
|
|
|
|
|
{% for name, cat in loop_helper.items() | sort(attribute='0') %}
|
|
|
|
{% for key, value in cat.items() | sort(attribute='0') %}
|
2022-01-16 13:37:10 +01:00
|
|
|
|
2022-01-15 18:25:03 +01:00
|
|
|
[{{ name }}.{{ key }}]
|
2022-01-15 18:52:57 +01:00
|
|
|
{% if value %}
|
|
|
|
{%- for skey, svalue in value.items() | sort(attribute='0') %}
|
2022-01-15 18:25:03 +01:00
|
|
|
{%- if svalue is string %}
|
2022-01-15 18:52:57 +01:00
|
|
|
{%- if svalue[0] == "'" %}
|
|
|
|
{{ skey }} = {{ svalue }}
|
|
|
|
{% else %}
|
2022-01-15 18:25:03 +01:00
|
|
|
{{ skey }} = "{{ svalue }}"
|
2022-01-15 18:52:57 +01:00
|
|
|
{% endif %}
|
2022-01-15 18:25:03 +01:00
|
|
|
{% else %}
|
|
|
|
{{ skey }} = {{ svalue | tojson }}
|
|
|
|
{% endif %}
|
2022-01-15 18:52:57 +01:00
|
|
|
{% endfor %}
|
|
|
|
{%- endif %}
|
2022-01-15 18:25:03 +01:00
|
|
|
{% endfor %}
|
|
|
|
{% endfor %}
|