diff --git a/defaults/main.yml b/defaults/main.yml index a11aa6d..5467edb 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -14,6 +14,7 @@ prometheus_mongodb_exporter_port: 27017 prometheus_phpfpm_sockets_directory: "/run/php/" +prometheus_postgres_exporter_systemd_user: "postgres" prometheus_postgres_exporter_host: "/var/run/postgresql/" prometheus_postgres_exporter_sslmode: "disable" prometheus_postgres_exporter_user: "postgres" diff --git a/templates/systemd/prometheus-postgres-exporter.service.j2 b/templates/systemd/prometheus-postgres-exporter.service.j2 index 28c9092..354852a 100644 --- a/templates/systemd/prometheus-postgres-exporter.service.j2 +++ b/templates/systemd/prometheus-postgres-exporter.service.j2 @@ -4,7 +4,7 @@ After=network.target [Service] Type=simple -User={{ prometheus_postgres_exporter_user }} +User={{ prometheus_postgres_exporter_systemd_user }} ExecStart=/usr/local/bin/prometheus-postgres-exporter EnvironmentFile=/etc/default/prometheus-postgres-exporter