2022-07-14 19:20:37 +00:00
|
|
|
- name: "Get PrusaSlicer version"
|
|
|
|
uri:
|
|
|
|
url: https://api.github.com/repos/prusa3d/PrusaSlicer/releases/latest
|
|
|
|
body_format: json
|
|
|
|
register: git_info
|
|
|
|
|
|
|
|
- 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] }}"
|
2022-09-12 18:51:02 +00:00
|
|
|
dest: /usr/local/bin/prusa-slicer.real
|
2022-07-14 19:20:37 +00:00
|
|
|
mode: 0755
|
|
|
|
|
|
|
|
- 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] }}"
|
2022-09-12 18:51:02 +00:00
|
|
|
dest: /usr/local/bin/prusa-slicer.real
|
2022-07-14 19:20:37 +00:00
|
|
|
mode: 0755
|
2022-09-12 18:51:02 +00:00
|
|
|
|
|
|
|
- name: Clean symbolic link
|
|
|
|
become: yes
|
|
|
|
file:
|
|
|
|
path: "/usr/local/bin/prusa-slicer"
|
|
|
|
state: absent
|
|
|
|
|
|
|
|
- name: Create symbolic link to real app
|
|
|
|
become: yes
|
|
|
|
file:
|
|
|
|
src: "/usr/local/bin/prusa-slicer.real"
|
|
|
|
dest: "/usr/local/bin/prusa-slicer"
|
|
|
|
state: link
|