From f470dd313ae96544a8aeb3132e83a4a9aa8bbb85 Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Mon, 8 Nov 2021 17:29:00 +0100 Subject: [PATCH] netbox: service templates should use user/group from vars --- roles/netbox/templates/netbox-rq.service.j2 | 4 ++-- roles/netbox/templates/netbox.service.j2 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/netbox/templates/netbox-rq.service.j2 b/roles/netbox/templates/netbox-rq.service.j2 index b35a7f5..981f4fb 100644 --- a/roles/netbox/templates/netbox-rq.service.j2 +++ b/roles/netbox/templates/netbox-rq.service.j2 @@ -7,8 +7,8 @@ Wants=network-online.target [Service] Type=simple -User=netbox -Group=netbox +User={{ netbox_user }} +Group={{ netbox_group }} WorkingDirectory=/opt/netbox-{{ netbox_version }} ExecStart=/opt/netbox-{{ netbox_version }}/venv/bin/python3 /opt/netbox-{{ netbox_version }}/netbox/manage.py rqworker diff --git a/roles/netbox/templates/netbox.service.j2 b/roles/netbox/templates/netbox.service.j2 index 5fae0f9..77c807d 100644 --- a/roles/netbox/templates/netbox.service.j2 +++ b/roles/netbox/templates/netbox.service.j2 @@ -7,8 +7,8 @@ Wants=network-online.target [Service] Type=simple -User=netbox -Group=netbox +User={{ netbox_user }} +Group={{ netbox_group }} PIDFile=/var/tmp/netbox.pid WorkingDirectory=/opt/netbox-{{ netbox_version }}