Add prusa-slicer

This commit is contained in:
Przemek Grondek 2022-05-19 23:52:38 +02:00
parent b180fde76b
commit bf6ca66f4b
2 changed files with 39 additions and 0 deletions

View File

@ -12,3 +12,4 @@
- signal
- virtual
- lutris
- prusa-slicer

View File

@ -0,0 +1,38 @@
- name: install jmespath for json_query
become: yes
apt:
update_cache: yes
pkg:
- python3-jmespath
- name: "Get PrusaSlicer version"
uri:
url: https://api.github.com/repos/prusa3d/PrusaSlicer/releases/latest
body_format: json
register: git_info
- name: "Download URL"
debug:
msg: "{{ (git_info.json | json_query('assets[*].browser_download_url') | select('match', '.*x64-GTK3.*AppImage'))[0] }}"
when: ansible_architecture == "x86_64"
- name: Install on amd64
become: yes
when: ansible_architecture == "x86_64"
get_url:
url: "{{ (git_info.json | json_query('assets[*].browser_download_url') | select('match', '.*x64-GTK3.*AppImage'))[0] }}"
dest: /usr/local/bin/prusa-slicer
mode: 0755
- name: "Download URL"
debug:
msg: "{{ (git_info.json | json_query('assets[*].browser_download_url') | select('match', '.*armv7l-GTK2.*AppImage'))[0] }}"
when: ansible_architecture == "arm64"
- name: Install on arm64
when: ansible_architecture == "arm64"
become: yes
get_url:
url: "{{ (git_info.json | json_query('assets[*].browser_download_url') | select('match', '.*armv7l-GTK2.*AppImage'))[0] }}"
dest: /usr/local/bin/prusa-slicer
mode: 0755