Add option for octoprint to restart itself
This commit is contained in:
parent
22fe99ae4d
commit
3e0faec15a
@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: install octoprint
|
||||
hosts: prusa
|
||||
hosts: prusa.lan
|
||||
become_method: sudo
|
||||
become_user: root
|
||||
become: yes
|
||||
@ -45,3 +45,8 @@
|
||||
name: octoprint
|
||||
enabled: yes
|
||||
state: started
|
||||
- name: enable octoprint to restart itself
|
||||
copy:
|
||||
src: sudoers.conf
|
||||
dest: /etc/sudoers.d/octoprint
|
||||
mode: 0440
|
3
octoprint/sudoers.conf
Normal file
3
octoprint/sudoers.conf
Normal file
@ -0,0 +1,3 @@
|
||||
octoprint ALL= NOPASSWD: /bin/systemctl start octoprint.service
|
||||
octoprint ALL= NOPASSWD: /bin/systemctl stop octoprint.service
|
||||
octoprint ALL= NOPASSWD: /bin/systemctl restart octoprint.service
|
Loading…
Reference in New Issue
Block a user