Create drop-in for sudo for vdr user

this allows to restart vdr.service and reboot the system
This commit is contained in:
Alexander Grothe
2018-05-23 09:55:57 +02:00
parent 96b19af073
commit b1389ae487
4 changed files with 26 additions and 0 deletions

View 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

View File

@@ -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]

View 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