added hostname label

This commit is contained in:
= 2023-03-30 10:23:32 +02:00
parent e832fc8e03
commit 2b46f1e9ed

View File

@ -38,7 +38,7 @@ adding fw service for promtail in {{ zone }} zone:
Create promtail container: Create promtail container:
cmd.run: cmd.run:
- name: podman container create --name promtail -p {{ http_listen_port }}:{{ http_listen_port}} -v /etc/promtail:/etc/promtail:ro -v /var/log/journal:/var/log/journal:ro docker.io/grafana/promtail:latest -config.file=/etc/promtail/promtail.conf - name: podman container create --name promtail -p {{ http_listen_port }}:{{ http_listen_port}} -v /etc/promtail:/etc/promtail:ro -v /var/log/journal:/var/log/journal:ro docker.io/grafana/promtail:latest -config.file=/etc/promtail/promtail.conf --client.external-labels=hostname={{ grains['fqdn'] }}
- unless: podman container exists promtail - unless: podman container exists promtail
Create promail unit file: Create promail unit file: