This Ansible role is used for getting logs from your host to Loki with Promtail.
It also has the ability to add custom Nginx config to extract detailed logs from Nginx with Promtail.
- SSH access to the server
- Docker installed
loki_user: this is your basic_auth user
loki_password: this is where the bearer token should be placed
loki_url: this the url where loki is used. /api/prom/push is already added in the template!
promtail_http_port: 0
promtail_grpc_port: 0
You will need to have Docker installed on the host. You can do that for example with this awesome role from Geerlingguy!
#!/usr/bin/env ansible-playbook
- hosts: production
become: true
roles:
- geerlingguy.docker
- skrepr.promtail
MIT / BSD
This role was created in 2022 by Jeroen van der Meulen, commisioned by Skrepr