Promtail is the log sending client for Grafana Loki. For traditional Linux systems, an RPM package is available from upstream, making installation fairly simple. Configuration is stored in a YAML file, so again, it's straightforward to configure via Ansible variables. Really, the only interesting step is adding the _promtail_ user, which is created by the RPM package, to the _systemd-journal_ group, so that Promtail can read the systemd journal files.
15 lines
305 B
YAML
15 lines
305 B
YAML
- name: ensure grafana-promtail yum repository is configured
|
|
copy:
|
|
src: grafana-promtail.repo
|
|
dest: /etc/yum.repos.d/grafana-promtail.repo
|
|
owner: root
|
|
group: root
|
|
mode: u=rw,go=r
|
|
tags:
|
|
- repo
|
|
|
|
- name: ensure promtail is installed
|
|
package:
|
|
name: promtail
|
|
state: present
|