Add option for octoprint to restart itself
This commit is contained in:
parent
22fe99ae4d
commit
3e0faec15a
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: install octoprint
|
- name: install octoprint
|
||||||
hosts: prusa
|
hosts: prusa.lan
|
||||||
become_method: sudo
|
become_method: sudo
|
||||||
become_user: root
|
become_user: root
|
||||||
become: yes
|
become: yes
|
||||||
@ -44,4 +44,9 @@
|
|||||||
systemd:
|
systemd:
|
||||||
name: octoprint
|
name: octoprint
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: started
|
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