mirror of
https://github.com/status-im/infra-nimbus.git
synced 2025-01-23 12:10:12 +00:00
Jakub Sokołowski
f96fe517e7
I was thinking of defining the jobs as nimbus user systemd units, but that would not work unless nimbus user logged in at least once. And Systemd services have no functionality for allowing non-root users to start/stop/restart system services, so sudo is the simplest way. Signed-off-by: Jakub Sokołowski <jakub@status.im>
11 lines
621 B
Django/Jinja
11 lines
621 B
Django/Jinja
# Allow non-root users start Nimbus builds with sudo.
|
|
|
|
{% for service in beacon_node_builds_branches %}
|
|
# {{ service.name }}
|
|
%{{ beacon_node_builds_group }} ALL= NOPASSWD: /usr/bin/systemctl *status beacon-node-build-{{ service.name }}[.service]
|
|
%{{ beacon_node_builds_group }} ALL= NOPASSWD: /usr/bin/systemctl *start beacon-node-build-{{ service.name }}[.service]
|
|
%{{ beacon_node_builds_group }} ALL= NOPASSWD: /usr/bin/systemctl *stop beacon-node-build-{{ service.name }}[.service]
|
|
%{{ beacon_node_builds_group }} ALL= NOPASSWD: /usr/bin/systemctl *restart beacon-node-build-{{ service.name }}[.service]
|
|
|
|
{% endfor %}
|