From 161e673727b7a9f02706197daf6f4378e563d7ea Mon Sep 17 00:00:00 2001 From: SebClem Date: Sun, 6 Mar 2022 22:17:18 +0100 Subject: [PATCH] :hammer: Switch to yml config --- defaults/main.yml | 4 ++-- templates/vector.yml.j2 | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 templates/vector.yml.j2 diff --git a/defaults/main.yml b/defaults/main.yml index 534df01..001896d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,5 +1,5 @@ -vector_template: vector.toml.j2 -vector_config_file: /etc/vector/vector.toml +vector_template: vector.yml.j2 +vector_config_file: /etc/vector/vector.yml vector_nightly: no vector_version: "{{ vector_nightly | ternary('nightly','latest') }}" add_vector_docker_group: no # Add vector user to "docker" group diff --git a/templates/vector.yml.j2 b/templates/vector.yml.j2 new file mode 100644 index 0000000..47808ce --- /dev/null +++ b/templates/vector.yml.j2 @@ -0,0 +1,17 @@ +{{ ansible_managed | comment }} + +data_dir: "/var/lib/vector" + + +api: + enabled: true + address: "0.0.0.0:8686" + +sources: + {{ sources | to_nice_yaml(indent=2) | trim | indent(2) }} + +transforms: + {{ transforms | to_nice_yaml(indent=2) | trim | indent(2) }} + +sinks: + {{ sinks | to_nice_yaml(indent=2) | trim | indent(2) }} \ No newline at end of file