Add Octoprint, accessible via octoprint.local.desu.ltd

This commit is contained in:
Salt 2022-05-10 06:43:52 -05:00
parent 0cd7205c27
commit 2944fc79b7
3 changed files with 50 additions and 0 deletions

View File

@ -2,6 +2,38 @@
# vim:ft=ansible: # vim:ft=ansible:
# Webservers # Webservers
--- ---
- hosts: pi-octoprint-1.home.mgmt.desu.ltd
gather_facts: no
module_defaults:
docker_container:
state: started
restart_policy: unless-stopped
pull: yes
tasks:
- name: include tasks for applications
include_tasks: tasks/{{ item }}
with_items:
- app/octoprint.yml
tags: [ always ]
roles:
- role: backup
vars:
backup_s3backup_list_extra:
- /data
tags: [ backup ]
- role: ingress
vars:
ingress_container_image: "nginx:latest"
ingress_container_ports:
- 80:80
ingress_container_config_mount: /etc/nginx/conf.d
ingress_container_persist_dir: /data/nginx
ingress_listen_args: 80
ingress_listen_tls: no
ingress_servers:
- name: octoprint.local.desu.ltd
proxy_pass: http://octoprint:80
tags: [ ingress ]
- hosts: vm-bot-1.home.mgmt.desu.ltd - hosts: vm-bot-1.home.mgmt.desu.ltd
gather_facts: no gather_facts: no
module_defaults: module_defaults:

View File

@ -136,6 +136,8 @@
value: vm-syncthing-1.home.mgmt.desu.ltd value: vm-syncthing-1.home.mgmt.desu.ltd
- record: transmission.local.desu.ltd - record: transmission.local.desu.ltd
value: zt1.vm-media-1.home.mgmt.desu.ltd value: zt1.vm-media-1.home.mgmt.desu.ltd
- record: octoprint.local.desu.ltd
value: zt0.pi-octoprint-1.home.mgmt.desu.ltd
loop_control: loop_control:
label: "{{ item.record }}" label: "{{ item.record }}"
delegate_to: localhost delegate_to: localhost

View File

@ -0,0 +1,16 @@
# vim:ft=ansible:
# https://github.com/OctoPrint/octoprint-docker/blob/master/docker-compose.yml
- name: docker deploy octoprint
docker_container:
name: octoprint
image: octoprint/octoprint:latest
# Uncomment all this stuff when the camera shows up
# env:
# ENABLE_MJPG_STREAMER: true
devices:
- /dev/ttyACM0:/dev/ttyACM0
# - /dev/video0:/dev/video0
volumes:
- /etc/localtime:/etc/localtime:ro
- /data/octoprint:/octoprint
tags: [ docker, octoprint ]