Put the configuration file under /etc/promtail

This commit is contained in:
Alexander Gorelyshev
2025-12-26 22:30:14 +04:00
parent d9180e04b2
commit 10a1a993c8
2 changed files with 9 additions and 2 deletions

View File

@@ -84,12 +84,19 @@
group: root
mode: "0644"
- name: "Ensure '/etc/promtail' exists"
ansible.builtin.file:
path: /etc/promtail
state: directory
owner: promtail
group: promtail
mode: "0755"
- name: "Template Promtail config file"
notify: "Enable and restart the Promtail daemon"
ansible.builtin.template:
src: templates/promtail.yml.j2
dest: /usr/local/bin/config-promtail.yml
dest: /etc/promtail/config.yml
owner: root
group: root
mode: "0644"

View File

@@ -5,7 +5,7 @@ After=network.target
[Service]
Type=simple
User=promtail
ExecStart=/usr/bin/promtail -config.file /usr/local/bin/config-promtail.yml
ExecStart=/usr/bin/promtail -config.file /etc/promtail/config.yml
[Install]
WantedBy=multi-user.target