From e095d5c72d7614099f61ef226f5471a63abf2f5c Mon Sep 17 00:00:00 2001 From: umatare5 Date: Tue, 10 Dec 2024 12:38:05 +0900 Subject: [PATCH 1/2] refactor(snmp_exporter): Start the daemon using the account made by `_common` Signed-off-by: umatare5 --- roles/snmp_exporter/templates/snmp_exporter.service.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/snmp_exporter/templates/snmp_exporter.service.j2 b/roles/snmp_exporter/templates/snmp_exporter.service.j2 index e22803265..5aedf30db 100644 --- a/roles/snmp_exporter/templates/snmp_exporter.service.j2 +++ b/roles/snmp_exporter/templates/snmp_exporter.service.j2 @@ -5,8 +5,8 @@ StartLimitInterval=0 [Service] Type=simple -User=nobody -Group={{ 'nogroup' if ansible_os_family == 'Debian' else 'nobody' }} +User={{ snmp_exporter_system_user }} +Group={{ snmp_exporter_system_group }} ExecReload=/bin/kill -HUP $MAINPID ExecStart={{ snmp_exporter_binary_install_dir }}/snmp_exporter \ {% if snmp_exporter_version is version('0.21.0', '>=') and From ea8774dd60b666143a12b3ce03e0a10622860fb9 Mon Sep 17 00:00:00 2001 From: umatare5 Date: Tue, 10 Dec 2024 14:35:34 +0900 Subject: [PATCH 2/2] refactor(alertmanager): Start the daemon using the account made by `_common` Signed-off-by: umatare5 --- roles/alertmanager/templates/alertmanager.service.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/alertmanager/templates/alertmanager.service.j2 b/roles/alertmanager/templates/alertmanager.service.j2 index 99f367347..0056369db 100644 --- a/roles/alertmanager/templates/alertmanager.service.j2 +++ b/roles/alertmanager/templates/alertmanager.service.j2 @@ -22,8 +22,8 @@ PIDFile=/run/alertmanager.pid {% else %} PIDFile=/var/run/alertmanager.pid {% endif %} -User=alertmanager -Group=alertmanager +User={{ alertmanager_system_user }} +Group={{ alertmanager_system_group }} ExecReload=/bin/kill -HUP $MAINPID ExecStart={{ alertmanager_binary_install_dir }}/alertmanager \ {% for option, value in (alertmanager_cluster.items() | sort) %}