refactor: manage GNOME extensions with reusable tasks for Pano and Tiling Shell
This commit is contained in:
@@ -1,40 +1,7 @@
|
||||
- name: Check if Pano - Clipboard Manager is installed
|
||||
ansible.builtin.stat:
|
||||
path: "{{ ansible_user_dir }}/.local/share/gnome-shell/extensions/pano@elhan.io"
|
||||
register: pano_check
|
||||
|
||||
- name: Create Pano - Clipboard Manager directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ ansible_user_dir }}/.local/share/gnome-shell/extensions/pano@elhan.io"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
when: not pano_check.stat.exists
|
||||
|
||||
# To update Pano, delete the existing directory and re-download the latest release
|
||||
# Replace the URL with the latest release URL and rerun the playbook/dotf update
|
||||
- name: Download Pano - Clipboard Manager
|
||||
ansible.builtin.get_url:
|
||||
url: https://github.com/oae/gnome-shell-pano/releases/download/v23-alpha3/pano@elhan.io.zip
|
||||
dest: "{{ ansible_user_dir }}/.local/share/gnome-shell/extensions/pano@elhan.io/release.zip"
|
||||
mode: '0644'
|
||||
when: not pano_check.stat.exists
|
||||
|
||||
- name: Extract Pano - Clipboard Manager
|
||||
ansible.builtin.unarchive:
|
||||
src: "{{ ansible_user_dir }}/.local/share/gnome-shell/extensions/pano@elhan.io/release.zip"
|
||||
dest: "{{ ansible_user_dir }}/.local/share/gnome-shell/extensions/pano@elhan.io/"
|
||||
when: not pano_check.stat.exists
|
||||
|
||||
- name: Cleanup post Pan - Clipboard Manager installation
|
||||
ansible.builtin.file:
|
||||
path: "{{ ansible_user_dir }}/.local/share/gnome-shell/extensions/pano@elhan.io/release.zip"
|
||||
state: absent
|
||||
when: not pano_check.stat.exists
|
||||
|
||||
- name: Notify user of required GNOME Shell extension reload
|
||||
ansible.builtin.debug:
|
||||
msg: >
|
||||
Please reload GNOME Shell by pressing Alt + F2, typing 'r' and pressing Enter.
|
||||
Then enable the Pano - Clipboard Manager extension in GNOME Tweaks.
|
||||
Or on Wayland, log out and back in.
|
||||
when: not pano_check.stat.exists
|
||||
- name: Manage Pano Clipboard Manager
|
||||
ansible.builtin.include_tasks: tasks/workstations/gnome-extensions/manage_gnome_extension.yml
|
||||
vars:
|
||||
git_tag: "v23-alpha3"
|
||||
ext_name: "Pano - Clipboard Manager"
|
||||
ext_url: "https://github.com/oae/gnome-shell-pano/releases/download/%TAG%/pano@elhan.io.zip"
|
||||
ext_id: "pano@elhan.io"
|
||||
|
Reference in New Issue
Block a user