34 lines
767 B
YAML
34 lines
767 B
YAML
|
---
|
||
|
- hosts: leftcoastlab
|
||
|
become: yes
|
||
|
tasks:
|
||
|
- name: Include Vars
|
||
|
include_vars:
|
||
|
dir: ../vars
|
||
|
|
||
|
- name: Ensure /opt/vector/ exists
|
||
|
file:
|
||
|
path: /opt/vector
|
||
|
state: directory
|
||
|
|
||
|
- name: Copy over Vector config
|
||
|
copy:
|
||
|
src: ../files/vector.toml
|
||
|
dest: /opt/vector/vector.toml
|
||
|
|
||
|
- name: Start up 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"
|
||
|
|
||
|
|
||
|
|