Skip to content

skrepr/ansible-role-promtail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

skrepr

Ansible Role Promtail

Releases LICENSE CI Issues PR Commits Stars Forks

About

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.

Ansible Role Ansible Role Ansible Quality Score

Requirements

  • SSH access to the server
  • Docker installed

Role Variables


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

Dependencies

You will need to have Docker installed on the host. You can do that for example with this awesome role from Geerlingguy!

Example Playbook

#!/usr/bin/env ansible-playbook


- hosts: production
  become: true

  roles:
   - geerlingguy.docker
   - skrepr.promtail

License

MIT / BSD

Author Information

This role was created in 2022 by Jeroen van der Meulen, commisioned by Skrepr