diff --git a/roles/prusa-slicer/tasks/config-repository.yml b/roles/prusa-slicer/tasks/config-repository.yml deleted file mode 100644 index 57207f4..0000000 --- a/roles/prusa-slicer/tasks/config-repository.yml +++ /dev/null @@ -1,26 +0,0 @@ -- name: checkout prusa profiles repo - git: - repo: "{{ prusa_slicer.repo }}" - dest: "{{ ansible_user_dir }}/.config/PrusaSlicer" - clone: yes - update: yes - -- name: Install wrapper - become: yes - copy: - src: usr/local/bin/prusa-slicer.wrapper - dest: /usr/local/bin/prusa-slicer.wrapper - mode: '0755' - -- name: clean link - become: yes - file: - path: "/usr/local/bin/prusa-slicer" - state: absent - -- name: Create symbolic link to wrapper - become: yes - file: - src: "/usr/local/bin/prusa-slicer.wrapper" - dest: "/usr/local/bin/prusa-slicer" - state: link diff --git a/roles/prusa-slicer/tasks/install-program.yml b/roles/prusa-slicer/tasks/install-program.yml index 5142ca5..b76075c 100644 --- a/roles/prusa-slicer/tasks/install-program.yml +++ b/roles/prusa-slicer/tasks/install-program.yml @@ -1,6 +1,12 @@ - name: Install prusa-slicer [Ubuntu] when: ansible_distribution == "Ubuntu" block: + - name: Remove old version/symbolic link + become: yes + file: + path: "/usr/local/bin/prusa-slicer" + state: absent + - name: "Get PrusaSlicer version" uri: url: https://api.github.com/repos/prusa3d/PrusaSlicer/releases/latest @@ -12,7 +18,7 @@ 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.real + dest: /usr/local/bin/prusa-slicer mode: 0755 - name: Install on arm64 @@ -20,22 +26,9 @@ 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.real + dest: /usr/local/bin/prusa-slicer mode: 0755 - - 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 - - name: Install prusa-slicer [Arch] when: ansible_distribution == "Archlinux" shell: diff --git a/roles/prusa-slicer/tasks/main.yml b/roles/prusa-slicer/tasks/main.yml index 7d0a92f..ad8ce28 100644 --- a/roles/prusa-slicer/tasks/main.yml +++ b/roles/prusa-slicer/tasks/main.yml @@ -1,4 +1 @@ - include_tasks: install-program.yml - -- include_tasks: config-repository.yml - when: ansible_distribution == "Ubuntu"