Put the configuration file under /etc/promtail
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user