Compare commits
1 commit
main
...
bump-ardui
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
896b1e1544 |
21 changed files with 209 additions and 318 deletions
|
|
@ -6,8 +6,8 @@ variables:
|
||||||
PACKER_VERSION: 1.4.3
|
PACKER_VERSION: 1.4.3
|
||||||
ANNOUNCE: http://labsync.lab.fablab-nea.de:6969/announce
|
ANNOUNCE: http://labsync.lab.fablab-nea.de:6969/announce
|
||||||
WEBSEED: http://labsync.lab.fablab-nea.de/labsync/$CI_COMMIT_REF_NAME/$CI_PIPELINE_ID/images
|
WEBSEED: http://labsync.lab.fablab-nea.de/labsync/$CI_COMMIT_REF_NAME/$CI_PIPELINE_ID/images
|
||||||
DOCKER_IMAGE_BUILDER: ${CI_REGISTRY_IMAGE}/labsync-builder:main
|
DOCKER_IMAGE_BUILDER: ${CI_REGISTRY_IMAGE}/labsync-builder:$CI_COMMIT_REF_SLUG
|
||||||
DOCKER_IMAGE_SECURITY_SCANNER: ${CI_REGISTRY_IMAGE}/security-scanner:main
|
DOCKER_IMAGE_SECURITY_SCANNER: ${CI_REGISTRY_IMAGE}/security-scanner:$CI_COMMIT_REF_SLUG
|
||||||
DOCKER_TLS_CERTDIR: ""
|
DOCKER_TLS_CERTDIR: ""
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
|
|
@ -21,26 +21,17 @@ dockerimage_builder:
|
||||||
- apk add --no-cache make
|
- apk add --no-cache make
|
||||||
services:
|
services:
|
||||||
- docker:dind
|
- docker:dind
|
||||||
variables:
|
|
||||||
DOCKER_IMAGE_BUILDER: ${CI_REGISTRY_IMAGE}/labsync-builder:$CI_COMMIT_REF_SLUG
|
|
||||||
script:
|
script:
|
||||||
- docker pull $DOCKER_IMAGE_BUILDER || true
|
- docker pull $DOCKER_IMAGE_BUILDER || true
|
||||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
|
||||||
- make builderimg
|
- make builderimg
|
||||||
- docker push $DOCKER_IMAGE_BUILDER
|
- docker push $DOCKER_IMAGE_BUILDER
|
||||||
- echo "DOCKER_IMAGE_BUILDER=$DOCKER_IMAGE_BUILDER" >> build.env
|
tags:
|
||||||
artifacts:
|
- fablab
|
||||||
reports:
|
- ssd
|
||||||
dotenv: build.env
|
except:
|
||||||
rules:
|
refs:
|
||||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
- schedules
|
||||||
when: on_success
|
|
||||||
- if:
|
|
||||||
changes:
|
|
||||||
paths:
|
|
||||||
- builder/**/*
|
|
||||||
compare_to: main
|
|
||||||
when: on_success
|
|
||||||
|
|
||||||
dockerimage_security_scanner:
|
dockerimage_security_scanner:
|
||||||
stage: prepare
|
stage: prepare
|
||||||
|
|
@ -50,22 +41,15 @@ dockerimage_security_scanner:
|
||||||
- docker:dind
|
- docker:dind
|
||||||
script:
|
script:
|
||||||
- docker pull $DOCKER_IMAGE_SECURITY_SCANNER || true
|
- docker pull $DOCKER_IMAGE_SECURITY_SCANNER || true
|
||||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
|
||||||
- make secscanimg
|
- make secscanimg
|
||||||
- docker push $DOCKER_IMAGE_SECURITY_SCANNER
|
- docker push $DOCKER_IMAGE_SECURITY_SCANNER
|
||||||
- echo "DOCKER_IMAGE_SECURITY_SCANNER=${CI_REGISTRY_IMAGE}/security-scanner:$CI_COMMIT_REF_SLUG" >> build.env
|
tags:
|
||||||
artifacts:
|
- fablab
|
||||||
reports:
|
- ssd
|
||||||
dotenv: build.env
|
except:
|
||||||
rules:
|
refs:
|
||||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
- schedules
|
||||||
when: on_success
|
|
||||||
- if:
|
|
||||||
changes:
|
|
||||||
paths:
|
|
||||||
- security-scanner/**/*
|
|
||||||
compare_to: main
|
|
||||||
when: on_success
|
|
||||||
|
|
||||||
security_scanner:
|
security_scanner:
|
||||||
stage: check
|
stage: check
|
||||||
|
|
@ -81,17 +65,8 @@ security_scanner:
|
||||||
variables:
|
variables:
|
||||||
- $task == "security-scanner"
|
- $task == "security-scanner"
|
||||||
- $target
|
- $target
|
||||||
|
tags:
|
||||||
lightburn-download:
|
- dedicated
|
||||||
stage: prepare
|
|
||||||
image: alpine
|
|
||||||
script:
|
|
||||||
- mkdir -p packer/ansible/roles/lightburn/files
|
|
||||||
- 'wget -O packer/ansible/roles/lightburn/files/lightburn.zip --header "JOB-TOKEN: $CI_JOB_TOKEN" "${CI_SERVER_URL}/api/v4/projects/fablab%2Flightburn-patched/jobs/artifacts/main/download?job=patch-Linux64"'
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- packer/ansible/roles/lightburn/files/lightburn.zip
|
|
||||||
expire_in: 4 hours
|
|
||||||
|
|
||||||
.squashfs_template: &squashfs_template
|
.squashfs_template: &squashfs_template
|
||||||
image: $DOCKER_IMAGE_BUILDER
|
image: $DOCKER_IMAGE_BUILDER
|
||||||
|
|
@ -99,8 +74,6 @@ lightburn-download:
|
||||||
services:
|
services:
|
||||||
- docker:dind
|
- docker:dind
|
||||||
script:
|
script:
|
||||||
- echo DOCKER_IMAGE_BUILDER=$DOCKER_IMAGE_BUILDER
|
|
||||||
- echo DOCKER_IMAGE_SECURITY_SCANNER=$DOCKER_IMAGE_SECURITY_SCANNER
|
|
||||||
- scripts/packer.sh debian-bookworm
|
- scripts/packer.sh debian-bookworm
|
||||||
- aws --endpoint-url "$AWS_ENDPOINT_URL" s3 cp images/ "s3://$AWS_BUCKET/$CI_COMMIT_REF_SLUG/$CI_JOB_ID/" --recursive --no-progress
|
- aws --endpoint-url "$AWS_ENDPOINT_URL" s3 cp images/ "s3://$AWS_BUCKET/$CI_COMMIT_REF_SLUG/$CI_JOB_ID/" --recursive --no-progress
|
||||||
artifacts:
|
artifacts:
|
||||||
|
|
@ -111,6 +84,9 @@ lightburn-download:
|
||||||
- images/*.linux
|
- images/*.linux
|
||||||
#- images/*.squashfs
|
#- images/*.squashfs
|
||||||
- images/*.torrent
|
- images/*.torrent
|
||||||
|
tags:
|
||||||
|
- fablab
|
||||||
|
- ssd
|
||||||
|
|
||||||
squashfs_featurebranch:
|
squashfs_featurebranch:
|
||||||
<<: *squashfs_template
|
<<: *squashfs_template
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,6 @@
|
||||||
- role: firefox
|
- role: firefox
|
||||||
- role: windowmanager
|
- role: windowmanager
|
||||||
- role: inkscape
|
- role: inkscape
|
||||||
- role: lightburn
|
|
||||||
- role: prusa-slicer
|
|
||||||
- role: fablab
|
- role: fablab
|
||||||
- role: hardware
|
- role: hardware
|
||||||
- role: docker
|
- role: docker
|
||||||
|
|
@ -39,13 +37,58 @@
|
||||||
timezone: Europe/Berlin
|
timezone: Europe/Berlin
|
||||||
fablab:
|
fablab:
|
||||||
arduino:
|
arduino:
|
||||||
version: 1.8.5
|
version: 1.8.19
|
||||||
visicut:
|
visicut:
|
||||||
url: "https://github.com/t-oster/VisiCut/releases/download/1.7_310/visicut_1.7-310-gcf8c087-1_all.deb"
|
url: "https://github.com/t-oster/VisiCut/releases/download/1.7_310/visicut_1.7-310-gcf8c087-1_all.deb"
|
||||||
cura:
|
cura:
|
||||||
version: 3.3.1
|
version: 3.3.1
|
||||||
lightburn:
|
lightburn:
|
||||||
dockerimage: r.jalr.de/fablab/lightburn
|
dockerimage: r.jalr.de/fablab/lightburn
|
||||||
|
prusa_slicer:
|
||||||
|
settings: |
|
||||||
|
no_controller = 1
|
||||||
|
no_defaults = 1
|
||||||
|
preset_update = 0
|
||||||
|
show_splash_screen = 0
|
||||||
|
use_inches = 0
|
||||||
|
version_check = 0
|
||||||
|
view_mode = expert
|
||||||
|
|
||||||
|
[filaments]
|
||||||
|
AmazonBasics TPU @MINI = 1
|
||||||
|
Das Filament PLA = 1
|
||||||
|
Generic PETG = 1
|
||||||
|
Generic PETG @MINI = 1
|
||||||
|
Generic PETG @MMU2 = 1
|
||||||
|
Generic PLA = 1
|
||||||
|
Generic PLA @MMU2 = 1
|
||||||
|
Prusament ASA = 1
|
||||||
|
Prusament ASA @MINI = 1
|
||||||
|
Prusament ASA @MMU2 = 1
|
||||||
|
Prusament PC Blend = 1
|
||||||
|
Prusament PC Blend @MINI = 1
|
||||||
|
Prusament PC Blend @MMU2 = 1
|
||||||
|
Prusament PETG = 1
|
||||||
|
Prusament PETG @MINI = 1
|
||||||
|
Prusament PETG @MMU2 = 1
|
||||||
|
Prusament PLA = 1
|
||||||
|
Prusament PLA @MMU2 = 1
|
||||||
|
Prusament PVB = 1
|
||||||
|
Prusament PVB @MMU2 = 1
|
||||||
|
Verbatim BVOH = 1
|
||||||
|
Verbatim BVOH @MMU2 = 1
|
||||||
|
|
||||||
|
[presets]
|
||||||
|
filament = Prusament PLA
|
||||||
|
physical_printer =
|
||||||
|
print = 0.15mm QUALITY @MK3
|
||||||
|
printer = Original Prusa i3 MK3
|
||||||
|
sla_material =
|
||||||
|
sla_print =
|
||||||
|
|
||||||
|
[vendor:PrusaResearch]
|
||||||
|
model:MK3 = 0.4
|
||||||
|
model:MK3SMMU2S = 0.4
|
||||||
firefox:
|
firefox:
|
||||||
language_packs:
|
language_packs:
|
||||||
- de
|
- de
|
||||||
|
|
@ -66,56 +109,3 @@
|
||||||
Du hast Dich mit einem Gast-Account angemeldet. Alle Daten werden nach
|
Du hast Dich mit einem Gast-Account angemeldet. Alle Daten werden nach
|
||||||
der Anmeldung gelöscht. Wenn Du Deine Daten dauerhaft speichern
|
der Anmeldung gelöscht. Wenn Du Deine Daten dauerhaft speichern
|
||||||
möchtest, lege Dir bitte einen Account an!
|
möchtest, lege Dir bitte einen Account an!
|
||||||
lightburn:
|
|
||||||
devices:
|
|
||||||
- https://raw.githubusercontent.com/fablab-nea/LaserKutter/main/lightburn/LaserKutter.lbdev
|
|
||||||
prusa_slicer:
|
|
||||||
settings: |
|
|
||||||
no_controller = 1
|
|
||||||
no_defaults = 1
|
|
||||||
preset_update = 0
|
|
||||||
show_splash_screen = 0
|
|
||||||
use_inches = 0
|
|
||||||
version_check = 0
|
|
||||||
view_mode = expert
|
|
||||||
tls_accepted_cert_store_location = /etc/ssl/certs/ca-certificates.crt
|
|
||||||
tls_cert_store_accepted = yes
|
|
||||||
|
|
||||||
[filaments]
|
|
||||||
AmazonBasics TPU @MINI = 1
|
|
||||||
Das Filament PLA = 1
|
|
||||||
Generic PETG = 1
|
|
||||||
Generic PETG @MINI = 1
|
|
||||||
Generic PETG @MMU2 = 1
|
|
||||||
Generic PLA = 1
|
|
||||||
Generic PLA @MMU2 = 1
|
|
||||||
Prusament ASA = 1
|
|
||||||
Prusament ASA @MINI = 1
|
|
||||||
Prusament ASA @MMU2 = 1
|
|
||||||
Prusament PC Blend = 1
|
|
||||||
Prusament PC Blend @MINI = 1
|
|
||||||
Prusament PC Blend @MMU2 = 1
|
|
||||||
Prusament PETG = 1
|
|
||||||
Prusament PETG @MINI = 1
|
|
||||||
Prusament PETG @MMU2 = 1
|
|
||||||
Prusament PLA = 1
|
|
||||||
Prusament PLA @MMU2 = 1
|
|
||||||
Prusament PVB = 1
|
|
||||||
Prusament PVB @MMU2 = 1
|
|
||||||
Verbatim BVOH = 1
|
|
||||||
Verbatim BVOH @MMU2 = 1
|
|
||||||
|
|
||||||
[presets]
|
|
||||||
filament = Prusament PLA
|
|
||||||
physical_printer =
|
|
||||||
print = 0.15mm QUALITY @MK3
|
|
||||||
printer = Original Prusa i3 MK3
|
|
||||||
sla_material =
|
|
||||||
sla_print =
|
|
||||||
|
|
||||||
[vendor:PrusaResearch]
|
|
||||||
model:MK3 = 0.4
|
|
||||||
model:MK3SMMU2S = 0.4
|
|
||||||
|
|
||||||
[vendor:Ultimaker]
|
|
||||||
model:ULTIMAKER2 = 0.4
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=LightBurn
|
||||||
|
GenericName=LightBurn
|
||||||
|
Comment=Laser Cutter Job Control Application
|
||||||
|
Exec=x-terminal-emulator -e 'sudo /usr/local/bin/lightburn'
|
||||||
|
Icon=/usr/local/share/lightburn/lightburn.png
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Categories=Graphics
|
||||||
34
packer/ansible/roles/fablab/files/lightburn/lightburn.sh
Executable file
34
packer/ansible/roles/fablab/files/lightburn/lightburn.sh
Executable file
|
|
@ -0,0 +1,34 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
. /etc/default/lightburn
|
||||||
|
|
||||||
|
if [ ! -z "$SUDO_COMMAND" ] && [ "$SUDO_COMMAND" = "$0" ]; then
|
||||||
|
home="$(getent passwd "$SUDO_UID" | cut -d: -f6)"
|
||||||
|
export PUID="$SUDO_UID"
|
||||||
|
export PGID="$SUDO_GID"
|
||||||
|
else
|
||||||
|
home="$HOME"
|
||||||
|
export PUID=$(id -u)
|
||||||
|
export PGID=$(id -g)
|
||||||
|
fi
|
||||||
|
|
||||||
|
config_dir="$home/.config/lightburn"
|
||||||
|
|
||||||
|
mkdir -p "$config_dir"
|
||||||
|
|
||||||
|
media="/media/$(id -un $PUID)"
|
||||||
|
if [ -e "$media" ]; then
|
||||||
|
media_volume="-v $media:/media"
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker run \
|
||||||
|
--rm \
|
||||||
|
-e PUID \
|
||||||
|
-e PGID \
|
||||||
|
-e DISPLAY \
|
||||||
|
-v /tmp/.X11-unix/:/tmp/.X11-unix/ \
|
||||||
|
-v $config_dir:/config/ \
|
||||||
|
-v $home:/workdir/ \
|
||||||
|
$media_volume \
|
||||||
|
--network=none \
|
||||||
|
"$LIGHTBURN_DOCKER_IMAGE"
|
||||||
66
packer/ansible/roles/fablab/tasks/lightburn.yml
Normal file
66
packer/ansible/roles/fablab/tasks/lightburn.yml
Normal file
|
|
@ -0,0 +1,66 @@
|
||||||
|
---
|
||||||
|
- file:
|
||||||
|
path: /usr/local/share/lightburn
|
||||||
|
state: directory
|
||||||
|
mode: "0755"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
|
||||||
|
- name: copy icon
|
||||||
|
copy:
|
||||||
|
src: lightburn/lightburn.png
|
||||||
|
dest: /usr/local/share/lightburn/lightburn.png
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0644"
|
||||||
|
|
||||||
|
- name: copy script
|
||||||
|
copy:
|
||||||
|
src: lightburn/lightburn.sh
|
||||||
|
dest: /usr/local/bin/lightburn
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
|
- name: add lightburn configuration
|
||||||
|
template:
|
||||||
|
src: lightburn/lightburn.j2
|
||||||
|
dest: /etc/default/lightburn
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0644"
|
||||||
|
|
||||||
|
- name: add lightburn to applications menu
|
||||||
|
copy:
|
||||||
|
src: lightburn/lightburn.desktop
|
||||||
|
dest: /usr/share/applications/lightburn.desktop
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0644"
|
||||||
|
|
||||||
|
- name: add group
|
||||||
|
group:
|
||||||
|
name: lightburn
|
||||||
|
system: yes
|
||||||
|
|
||||||
|
- name: add sudoers config
|
||||||
|
copy:
|
||||||
|
content: "%lightburn ALL=/usr/local/bin/lightburn, NOPASSWD:/usr/local/bin/lightburn\n"
|
||||||
|
dest: /etc/sudoers.d/lightburn
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0644"
|
||||||
|
|
||||||
|
- name: ensure guest-account settings directory exists
|
||||||
|
file:
|
||||||
|
path: /etc/guest-account
|
||||||
|
state: directory
|
||||||
|
mode: "0755"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
|
||||||
|
- name: add lightburn group to guest account
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/guest-account/groups
|
||||||
|
line: lightburn
|
||||||
|
create: yes
|
||||||
|
|
@ -18,6 +18,12 @@
|
||||||
- import_tasks: visicut.yml
|
- import_tasks: visicut.yml
|
||||||
tags:
|
tags:
|
||||||
- fablab:visicut
|
- fablab:visicut
|
||||||
|
- import_tasks: lightburn.yml
|
||||||
|
tags:
|
||||||
|
- fablab:lightburn
|
||||||
|
- import_tasks: prusa.yml
|
||||||
|
tags:
|
||||||
|
- fablab:prusa
|
||||||
# - import_tasks: platformio.yml
|
# - import_tasks: platformio.yml
|
||||||
# tags:
|
# tags:
|
||||||
# - fablab:platformio
|
# - fablab:platformio
|
||||||
|
|
|
||||||
25
packer/ansible/roles/fablab/tasks/prusa.yml
Normal file
25
packer/ansible/roles/fablab/tasks/prusa.yml
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
---
|
||||||
|
- name: install slic3r-prusa
|
||||||
|
apt:
|
||||||
|
name: slic3r-prusa
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: create skel directories
|
||||||
|
file:
|
||||||
|
path: "/etc/skel/{{ item }}"
|
||||||
|
state: directory
|
||||||
|
loop:
|
||||||
|
- .config
|
||||||
|
- .config/PrusaSlicer
|
||||||
|
- .config/PrusaSlicer/vendor
|
||||||
|
|
||||||
|
- name: create symlink to vendor profiles
|
||||||
|
file:
|
||||||
|
src: /usr/share/PrusaSlicer/profiles/PrusaResearch.ini
|
||||||
|
dest: /etc/skel/.config/PrusaSlicer/vendor/PrusaResearch.ini
|
||||||
|
state: link
|
||||||
|
|
||||||
|
- name: Copy Prusa slicer settings
|
||||||
|
copy:
|
||||||
|
content: "{{ fablab.prusa_slicer.settings }}"
|
||||||
|
dest: /etc/skel/.config/PrusaSlicer/PrusaSlicer.ini
|
||||||
1
packer/ansible/roles/fablab/templates/lightburn/lightburn.j2
Executable file
1
packer/ansible/roles/fablab/templates/lightburn/lightburn.j2
Executable file
|
|
@ -0,0 +1 @@
|
||||||
|
LIGHTBURN_DOCKER_IMAGE='{{ fablab.lightburn.dockerimage }}'
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 2f40eef85264eb6646ea7e89cbd4659560b88235
|
Subproject commit 05d9c57336b13028c01c5bfd850431708c934016
|
||||||
1
packer/ansible/roles/lightburn/.gitignore
vendored
1
packer/ansible/roles/lightburn/.gitignore
vendored
|
|
@ -1 +0,0 @@
|
||||||
*.zip
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Name=LightBurn
|
|
||||||
Exec=/opt/LightBurn/LightBurn
|
|
||||||
Icon=/opt/LightBurn/LightBurn.png
|
|
||||||
Type=Application
|
|
||||||
Categories=Graphics;VectorGraphics;Engineering;
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
- name: Download devices files
|
|
||||||
uri:
|
|
||||||
url: "{{ device_url }}"
|
|
||||||
return_content: true
|
|
||||||
loop: "{{ lightburn.devices }}"
|
|
||||||
loop_control:
|
|
||||||
loop_var: device_url
|
|
||||||
register: lightburn_downloaded_devices
|
|
||||||
|
|
||||||
- name: Create lightburn settings
|
|
||||||
set_fact:
|
|
||||||
lightburn_devices: "{{ lightburn_devices | default([]) + [device_settings] }}"
|
|
||||||
vars:
|
|
||||||
device_settings: "{{ (device.content | from_json)['DeviceList'][0] }}"
|
|
||||||
loop: "{{ lightburn_downloaded_devices.results }}"
|
|
||||||
loop_control:
|
|
||||||
loop_var: device
|
|
||||||
label: "{{ device_settings.DisplayName }}"
|
|
||||||
|
|
||||||
- name: Create settings directory
|
|
||||||
file:
|
|
||||||
path: "{{ item }}"
|
|
||||||
state: directory
|
|
||||||
loop:
|
|
||||||
- /etc/skel/.config
|
|
||||||
- /etc/skel/.config/LightBurn
|
|
||||||
|
|
||||||
- name: Create settings file
|
|
||||||
copy:
|
|
||||||
dest: /etc/skel/.config/LightBurn/prefs.ini
|
|
||||||
content: "{{ lightburn_settings | to_nice_json() }}"
|
|
||||||
vars:
|
|
||||||
lightburn_settings:
|
|
||||||
DeviceList: "{{ lightburn_devices }}"
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
---
|
|
||||||
- name: Extract zip file
|
|
||||||
unarchive:
|
|
||||||
src: lightburn.zip
|
|
||||||
dest: /opt
|
|
||||||
- name: Create applications directory
|
|
||||||
file:
|
|
||||||
path: /usr/local/share/applications/
|
|
||||||
state: directory
|
|
||||||
- name: Copy desktop file
|
|
||||||
copy:
|
|
||||||
src: lightburn.desktop
|
|
||||||
dest: /usr/local/share/applications/lightburn.desktop
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
---
|
|
||||||
- block:
|
|
||||||
- import_tasks: install.yml
|
|
||||||
tags:
|
|
||||||
- lightburn:install
|
|
||||||
- import_tasks: devices.yml
|
|
||||||
tags:
|
|
||||||
- lightburn:devices
|
|
||||||
tags:
|
|
||||||
- lightburn
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
---
|
|
||||||
prusa_slicer_use_package: false
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Name=Prusa GCode viewer
|
|
||||||
Exec=/opt/PrusaSlicer/bin/prusa-slicer --gcodeviewer %F
|
|
||||||
Icon=/opt/PrusaSlicer/resources/icons/PrusaSlicer-gcodeviewer.svg
|
|
||||||
Terminal=false
|
|
||||||
Type=Application
|
|
||||||
MimeType=text/x.gcode;
|
|
||||||
Categories=Graphics;3DGraphics;
|
|
||||||
Keywords=3D;Printing;Slicer;
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Name=PrusaSlicer
|
|
||||||
GenericName=3D Printing Software
|
|
||||||
Terminal=false
|
|
||||||
Exec=/opt/PrusaSlicer/bin/prusa-slicer %F
|
|
||||||
Icon=/opt/PrusaSlicer/resources/icons/PrusaSlicer.png
|
|
||||||
Type=Application
|
|
||||||
MimeType=model/stl;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;application/x-amf;
|
|
||||||
Categories=Graphics;3DGraphics;Engineering;
|
|
||||||
Keywords=3D;Printing;Slicer;slice;3D;printer;convert;gcode;stl;obj;amf;SLA
|
|
||||||
StartupNotify=false
|
|
||||||
StartupWMClass=prusa-slicer
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
||||||
---
|
|
||||||
- set_fact:
|
|
||||||
prusa_slicer_profiles_directory: /usr/share/PrusaSlicer/profiles
|
|
||||||
when: prusa_slicer_use_package | bool
|
|
||||||
|
|
||||||
- set_fact:
|
|
||||||
prusa_slicer_profiles_directory: /opt/PrusaSlicer/resources/profiles
|
|
||||||
when: not prusa_slicer_use_package | bool
|
|
||||||
|
|
||||||
- name: create skel directories
|
|
||||||
file:
|
|
||||||
path: "/etc/skel/{{ item }}"
|
|
||||||
state: directory
|
|
||||||
loop:
|
|
||||||
- .config
|
|
||||||
- .config/PrusaSlicer
|
|
||||||
- .config/PrusaSlicer/vendor
|
|
||||||
|
|
||||||
- name: create symlink to vendor profiles
|
|
||||||
file:
|
|
||||||
src: "{{ prusa_slicer_profiles_directory }}/{{ item }}.ini"
|
|
||||||
dest: /etc/skel/.config/PrusaSlicer/vendor/{{ item }}.ini
|
|
||||||
state: link
|
|
||||||
loop:
|
|
||||||
- PrusaResearch
|
|
||||||
- Ultimaker
|
|
||||||
|
|
||||||
- name: Stat /opt/PrusaSlicer
|
|
||||||
stat:
|
|
||||||
path: /opt/PrusaSlicer
|
|
||||||
register: prusa_slicer_stat
|
|
||||||
|
|
||||||
- name: Set version
|
|
||||||
set_fact:
|
|
||||||
prusa_slicer_version: "{{ prusa_slicer_stat.stat.lnk_target | regex_replace('^/opt/PrusaSlicer-(.*)-[0-9]{12}$', '\\1') }}"
|
|
||||||
when: prusa_slicer_stat.stat.exists and prusa_slicer_stat.stat.islnk
|
|
||||||
|
|
||||||
- debug:
|
|
||||||
var: prusa_slicer_version
|
|
||||||
|
|
||||||
- name: Copy Prusa slicer settings
|
|
||||||
copy:
|
|
||||||
content: |
|
|
||||||
version_system_info_sent = {{ prusa_slicer_version | default('') }}
|
|
||||||
{{ prusa_slicer.settings }}
|
|
||||||
dest: /etc/skel/.config/PrusaSlicer/PrusaSlicer.ini
|
|
||||||
|
|
@ -1,60 +0,0 @@
|
||||||
---
|
|
||||||
- name: Get latest release
|
|
||||||
uri:
|
|
||||||
url: https://api.github.com/repos/prusa3d/PrusaSlicer/releases/latest
|
|
||||||
return_content: true
|
|
||||||
register: prusa_slicer_release
|
|
||||||
|
|
||||||
- name: Create tarball tempfile
|
|
||||||
tempfile:
|
|
||||||
state: file
|
|
||||||
suffix: .tar.gz
|
|
||||||
register: prusa_slicer_tarball
|
|
||||||
|
|
||||||
- name: Select asset
|
|
||||||
set_fact:
|
|
||||||
prusa_slicer_asset: "{{ asset }}"
|
|
||||||
when: "asset.name | regex_search('PrusaSlicer-.*linux-x64-GTK3.*\\.tar\\.bz2$')"
|
|
||||||
loop: "{{ prusa_slicer_release.json.assets }}"
|
|
||||||
loop_control:
|
|
||||||
loop_var: asset
|
|
||||||
label: "{{ asset.name }}"
|
|
||||||
|
|
||||||
- name: Download release file
|
|
||||||
get_url:
|
|
||||||
url: "{{ prusa_slicer_asset.browser_download_url }}"
|
|
||||||
dest: "{{ prusa_slicer_tarball.path }}"
|
|
||||||
force: true
|
|
||||||
|
|
||||||
- name: Extract tarball
|
|
||||||
unarchive:
|
|
||||||
src: "{{ prusa_slicer_tarball.path }}"
|
|
||||||
dest: /opt
|
|
||||||
remote_src: true
|
|
||||||
|
|
||||||
- name: Remove tarball
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ prusa_slicer_tarball.path }}"
|
|
||||||
state: absent
|
|
||||||
when: prusa_slicer_tarball.path is defined
|
|
||||||
|
|
||||||
- name: Create symlink
|
|
||||||
file:
|
|
||||||
src: "/opt/{{ prusa_slicer_directory }}"
|
|
||||||
dest: "/opt/PrusaSlicer"
|
|
||||||
state: link
|
|
||||||
vars:
|
|
||||||
prusa_slicer_directory: "{{ prusa_slicer_asset.name | regex_replace('\\.tar\\.bz2$', '') }}"
|
|
||||||
|
|
||||||
- name: Create applications directory
|
|
||||||
file:
|
|
||||||
path: /usr/local/share/applications/
|
|
||||||
state: directory
|
|
||||||
|
|
||||||
- name: Copy desktop files
|
|
||||||
copy:
|
|
||||||
src: "{{ item }}.desktop"
|
|
||||||
dest: /usr/local/share/applications/{{ item }}.desktop
|
|
||||||
loop:
|
|
||||||
- PrusaSlicer
|
|
||||||
- PrusaGcodeviewer
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
---
|
|
||||||
- block:
|
|
||||||
- import_tasks: package.yml
|
|
||||||
when: prusa_slicer_use_package | bool
|
|
||||||
tags:
|
|
||||||
- prusa-slicer:install
|
|
||||||
|
|
||||||
- import_tasks: install_from_github.yml
|
|
||||||
when: not prusa_slicer_use_package | bool
|
|
||||||
tags:
|
|
||||||
- prusa-slicer:install
|
|
||||||
|
|
||||||
- import_tasks: configure.yml
|
|
||||||
tags:
|
|
||||||
- prusa-slicer:configure
|
|
||||||
|
|
||||||
tags:
|
|
||||||
- prusa-slicer
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
---
|
|
||||||
- name: install slic3r-prusa
|
|
||||||
apt:
|
|
||||||
name: slic3r-prusa
|
|
||||||
state: present
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue