- hosts: dev become: true roles: - maintenance - base - development - shell - docker - ssh - user tasks: - name: Update apt cache apt: update_cache: yes - name: Enable 'universe' repo (Ubuntu and Mint only) command: add-apt-repository universe when: ansible_facts['distribution'] in ["Ubuntu", "Linux Mint"] changed_when: false ignore_errors: true - name: Remove Mint’s nosnap.pref block (Mint only) file: path: /etc/apt/preferences.d/nosnap.pref state: absent when: ansible_facts['distribution'] == "Linux Mint" - name: Install Redshift apt: name: redshift state: present # Modern Brave repo/key installation for all - name: Download Brave APT key get_url: url: https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg dest: /usr/share/keyrings/brave-browser-archive-keyring.gpg mode: '0644' - name: Add Brave repo (all Debian family) apt_repository: repo: "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main" filename: brave-browser state: present - name: Update apt cache after repo add apt: update_cache: yes - name: Install Brave browser apt: name: brave-browser state: present # Snap daemon install across all Debian family systems - name: Install Snap daemon apt: name: snapd state: present when: ansible_facts['os_family'] == "Debian" # Ensure snapd is running on Debian (optional, improves reliability) - name: Enable snapd socket on Debian systemd: name: snapd.socket enabled: true state: started when: ansible_facts['distribution'] == "Debian" - name: Force Ansible to reload facts setup: # Install IDE and other snaps everywhere Snap is available - name: Install VSCode IDE (Snap, all distros) community.general.snap: name: code classic: true state: present when: ansible_facts['os_family'] == "Debian" - name: Install Cursor (Snap, all distros) community.general.snap: name: cursor state: present when: ansible_facts['os_family'] == "Debian" - name: Install LibreOffice apt: name: libreoffice state: present - name: Install PDF reader (Evince) apt: name: evince state: present