From 015e75fa2bb321492b8059afa9579440453a6c10 Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Mon, 8 Nov 2021 17:29:25 +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 }}