40 lines
899 B
YAML
40 lines
899 B
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: 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
|
||
|
|