playbooks/promtail/local.yaml

26 lines
748 B
YAML

---
- name: Install promtail to Linux machines for log collection.
hosts: all
roles:
- role: patrickjahns.promtail
vars:
promtail_config_server:
http_listen_port: 9080
grpc_listen_port: 9081
promtail_config_clients:
- url: "http://200.1.154.246:3100/loki/api/v1/push"
external_labels:
host: "{{ ansible_hostname }}"
promtail_config_positions:
filename: /tmp/positions.yaml
promtail_config_scrape_configs:
- job_name: system
entry_parser: raw
static_configs:
- targets:
- localhost
labels:
job: varlogs
__path__: /var/log/*log