octoprint/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Sat, 11 Feb 2023 10:49:06 -0600
changeset 209 81014d20e5b1
parent 193 fd46c0e68c2c
permissions -rw-r--r--
Use rsync for nginx root copy.

---

- 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"