2024-01-17 17:45:49 +00:00
|
|
|
- name: make /etc/apt/keyrings
|
|
|
|
file:
|
|
|
|
path: /etc/apt/keyrings
|
|
|
|
state: directory
|
|
|
|
|
|
|
|
- name: install grafana apt key
|
|
|
|
copy:
|
|
|
|
src: grafana-apt-key.gpg
|
|
|
|
dest: /etc/apt/keyrings/grafana.gpg
|
|
|
|
|
|
|
|
- name: add grafana apt repo
|
|
|
|
apt_repository:
|
|
|
|
repo: "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main"
|
|
|
|
filename: "grafana"
|
|
|
|
|
2024-03-31 17:37:53 +00:00
|
|
|
- name: allow unattended upgrades from the grafana repo
|
|
|
|
template:
|
|
|
|
src: unattended-upgrades-promtail
|
|
|
|
dest: /etc/apt/apt.conf.d/unattended-upgrades-promtail
|
|
|
|
|
2024-01-17 17:45:49 +00:00
|
|
|
- name: install promtail
|
|
|
|
apt:
|
|
|
|
name: promtail
|
|
|
|
|
|
|
|
- name: make /etc/systemd/system/promtail.service.d
|
|
|
|
file:
|
|
|
|
path: /etc/systemd/system/promtail.service.d
|
|
|
|
state: directory
|
|
|
|
|
|
|
|
- name: install promtail.service override
|
|
|
|
template:
|
|
|
|
src: promtail-override.service
|
|
|
|
dest: /etc/systemd/system/promtail.service.d/override.conf
|
|
|
|
notify:
|
|
|
|
- systemctl daemon-reload
|
|
|
|
- restart promtail
|
|
|
|
|
|
|
|
- name: install promtail config
|
|
|
|
template:
|
|
|
|
src: promtail.yml
|
|
|
|
dest: /etc/promtail/config.yml
|
|
|
|
notify:
|
|
|
|
- restart promtail
|
|
|
|
|