refactor: reorganize Ansible tasks for better structure and include common package installations
All checks were successful
Nix Format Check / check-format (pull_request) Successful in 40s

This commit is contained in:
2025-01-22 15:11:58 +01:00
parent 596a3574df
commit c651722b73
20 changed files with 125 additions and 186 deletions

View File

@@ -0,0 +1,40 @@
- 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