Put the configuration file under /etc/promtail
This commit is contained in:
@@ -84,12 +84,19 @@
|
|||||||
group: root
|
group: root
|
||||||
mode: "0644"
|
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"
|
- name: "Template Promtail config file"
|
||||||
notify: "Enable and restart the Promtail daemon"
|
notify: "Enable and restart the Promtail daemon"
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: templates/promtail.yml.j2
|
src: templates/promtail.yml.j2
|
||||||
dest: /usr/local/bin/config-promtail.yml
|
dest: /etc/promtail/config.yml
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ After=network.target
|
|||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=promtail
|
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]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
Reference in New Issue
Block a user