Commit 754686de authored by Kristian Klausen's avatar Kristian Klausen 🎉 Committed by Jelle van der Waa
Browse files

promtail: Give access to the logrotated nginx access.log files

The files are initially created by nginx as 0644/http:root, but when
logrotate rotates the files it creates the new files as 0640/http:log,
which promtail can't read.

Fix the issue by adding the log group as a supplementary group.
parent d99f2fc0
[Service]
SupplementaryGroups=log
---
- name: restart promtail
service: name=promtail state=restarted
service: name=promtail daemon_reload=yes state=restarted
......@@ -12,5 +12,12 @@
tags:
- firewall
- name: create drop-in directory for promtail.service
file: path=/etc/systemd/system/promtail.service.d state=directory owner=root group=root mode=0755
- name: install drop-in for promtail.service
copy: src=override.conf dest=/etc/systemd/system/promtail.service.d/ owner=root group=root mode=0644
notify: restart promtail
- name: start and enable promtail
systemd: name=promtail.service enabled=yes daemon_reload=yes state=started
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment