From 6a1251fa1e2c72fe58f059b19f71d4ccb2f4cb74 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Thu, 15 Aug 2024 17:14:48 +0200 Subject: [PATCH] Remove configuration wrapper for prusa-slicer --- .../prusa-slicer/tasks/config-repository.yml | 26 ------------------- roles/prusa-slicer/tasks/install-program.yml | 23 ++++++---------- roles/prusa-slicer/tasks/main.yml | 3 --- 3 files changed, 8 insertions(+), 44 deletions(-) delete mode 100644 roles/prusa-slicer/tasks/config-repository.yml 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"