44 lines
1 KiB
YAML
44 lines
1 KiB
YAML
- 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"
|
|
|
|
- name: allow unattended upgrades from the grafana repo
|
|
template:
|
|
src: unattended-upgrades-promtail
|
|
dest: /etc/apt/apt.conf.d/unattended-upgrades-promtail
|
|
|
|
- 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
|
|
|