octoprint: allow configuration of printer profiles

Signed-off-by: Thomas Schmid <tom@lfence.de>
This commit is contained in:
Thomas 2022-01-11 20:23:50 +01:00
parent f4b6192bc1
commit f9d12a1f7b
3 changed files with 48 additions and 4 deletions

View File

@ -7,9 +7,40 @@ octoprint_config_salt: "{{ octoprint_salt }}"
octoprint_config_api_key: "{{ octoprint_api_key}}"
octoprint_config_secret_key: "{{ octoprint_secret_key }}"
octoprint_config_display_name: 3D-Printer
octoprint_config_default_profile: _default
octoprint_printer_dimension:
x: 350
y: 350
octoprint_printer_profiles:
- axes:
e:
inverted: false
speed: 300
x:
inverted: false
speed: 6000
y:
inverted: false
speed: 6000
z:
inverted: false
speed: 200
color: default
extruder:
count: 1
nozzleDiameter: 0.4
offsets:
- - 0.0
- 0.0
sharedNozzle: false
heatedBed: true
heatedChamber: false
id: _default
model: Generic RepRap Printer
name: Default
volume:
custom_box: false
depth: 200.0
formFactor: rectangular
height: 200.0
origin: lowerleft
width: 200.0
octoprint_printer_nozzle: 0.4

View File

@ -82,6 +82,16 @@
dest: "/home/{{octoprint_user}}/.octoprint/config.yaml"
notify: Restart octoprint
################################################################################
# Octoprint printer configuration
################################################################################
- name: Setup printer profiles
copy:
content: "{{ item | to_nice_yaml}}"
dest: "/home/{{ octoprint_user }}/.octoprint/printerProfiles/{{item.id}}.profile"
loop: "{{ octoprint_printer_profiles }}"
################################################################################
# Octoprint Users
################################################################################

View File

@ -14,6 +14,9 @@ plugins:
tracking:
enabled: false
printerProfiles:
default: {{ octoprint_config_default_profile }}
server:
commands:
serverRestartCommand: systemctl restart octoprint