octoprint/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Thu, 29 May 2025 20:01:29 -0500
changeset 242 e7083ad5c365
parent 238 bdbc88cb5078
permissions -rw-r--r--
Fixed an error with overwriting certbot certs.

---

- 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" break_system_packages="true"
  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"