src.nth.io/

summaryrefslogtreecommitdiff
path: root/octoprint/tasks
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2022-09-10 14:52:58 -0500
committerLuke Hoersten <[email protected]>2022-09-10 14:52:58 -0500
commitc8ed357319d0f597aca9fa50c5176d0e19205e7d (patch)
treef06760d7ee064de418b6a38024377f4070528a37 /octoprint/tasks
parent7896e9ba37e627d274119fd85367290db1b8a0cd (diff)
Initial octoprint role.
Diffstat (limited to 'octoprint/tasks')
-rw-r--r--octoprint/tasks/main.yaml21
1 files changed, 21 insertions, 0 deletions
diff --git a/octoprint/tasks/main.yaml b/octoprint/tasks/main.yaml
new file mode 100644
index 0000000..debed3c
--- /dev/null
+++ b/octoprint/tasks/main.yaml
@@ -0,0 +1,21 @@
+---
+
+- name: add octoprint user
+ become: yes
+ user: name="octoprint" groups="{{octoprint_groups}}" home="/opt/octoprint" system="yes"
+
+- name: pip install octoprint
+ become: yes
+ pip: name="octoprint" executable="pip3"
+ notify: restart octoprint
+
+- name: install octoprint systemd service
+ become: yes
+ copy:
+ src: "octoprint.service"
+ dest: "/lib/systemd/system/octoprint.service"
+ notify: restart octoprint
+
+- name: ensure octoprint service is started
+ become: yes
+ systemd: name="octoprint.service" enabled="yes"