diff --git a/docker-host/setup/files/vector.toml b/docker-host/setup/files/vector.toml deleted file mode 100644 index 9808fcf..0000000 --- a/docker-host/setup/files/vector.toml +++ /dev/null @@ -1,13 +0,0 @@ -[sources.host_metrics] -type = "host_metrics" -collectors = [ "cpu", "disk", "host", "memory", "network" ] -namespace = "leftcoastlab-host" -scrape_interval_secs = 60 - -[sinks.host_metrics_output] -type = "console" -inputs = [ "host_metrics" ] -target = "stdout" - -encoding.codec = "json" - diff --git a/docker-host/setup/tasks/vector.yml b/docker-host/setup/tasks/vector.yml index 3aec912..cf58bd1 100644 --- a/docker-host/setup/tasks/vector.yml +++ b/docker-host/setup/tasks/vector.yml @@ -6,28 +6,26 @@ include_vars: dir: ../vars - - name: Ensure /opt/vector/ exists + - name: Delete /opt/vector/ file: path: /opt/vector - state: directory + state: absent - - name: Copy over Vector config - copy: - src: ../files/vector.toml - dest: /opt/vector/vector.toml - - - name: Start up Vector Container + - name: Stop Vector Container community.docker.docker_container: name: vector-host-metrics - image: timberio/vector:latest-alpine - pull: yes - restart_policy: always - recreate: yes - volumes: - - "/opt/vector/vector.toml:/etc/vector/vector.toml" - log_driver: loki - log_options: - loki-url: "http://localhost:{{LOKI_PORT}}/loki/api/v1/push" + state: absent + + - name: Stop Vector Container + community.docker.docker_container: + name: vector-host-metrics + state: absent + + - name: Delete Vector Image + community.docker.docker_image: + name: timberio/vector:latest-alpine + state: absent +