Create drop-in for sudo for vdr user
this allows to restart vdr.service and reboot the system
This commit is contained in:
6
roles/yavdr-common/tasks/create_sudoers.yml
Normal file
6
roles/yavdr-common/tasks/create_sudoers.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
- name: create /etc/sudoers.d/yavdr from template
|
||||
template:
|
||||
src: templates/yavdr.sudoers.j2
|
||||
dest: /etc/sudoers.d/yavdr
|
||||
mode: '0444'
|
||||
validate: visudo -cf %s
|
@@ -6,4 +6,5 @@
|
||||
- import_tasks: configure_apt.yml
|
||||
- import_tasks: configure_system.yml
|
||||
- import_tasks: create_directories.yml
|
||||
- import_tasks: create_sudoers.yml
|
||||
tags: [install]
|
||||
|
2
roles/yavdr-common/templates/yavdr.sudoers.j2
Normal file
2
roles/yavdr-common/templates/yavdr.sudoers.j2
Normal file
@@ -0,0 +1,2 @@
|
||||
{{ vdr.user }} ALL=NOPASSWD: /bin/systemctl --no-block restart vdr.service
|
||||
{{ vdr.user }} ALL=NOPASSWD: /bin/systemctl --no-block reboot
|
Reference in New Issue
Block a user