Replace Firefox Snap with Mozilla repo package

Fixes #20
This commit is contained in:
Kenneth Benzie 2024-04-06 12:57:59 +01:00
parent b57c3f9916
commit 19d0ac491b
3 changed files with 57 additions and 2 deletions

View File

@ -3,10 +3,11 @@
- import_playbook: UnixGUI.yaml - import_playbook: UnixGUI.yaml
- hosts: localhost - hosts: localhost
roles: roles:
- role: firefox
- role: kitty
- role: cider - role: cider
- role: gnome-tweaks - role: gnome-tweaks
when: "'GNOME' in ansible_env.XDG_CURRENT_DESKTOP" when: "'GNOME' in ansible_env.XDG_CURRENT_DESKTOP"
- role: kitty
- role: xremap - role: xremap
when: > when: >
'GNOME' in ansible_env.XDG_CURRENT_DESKTOP and 'GNOME' in ansible_env.XDG_CURRENT_DESKTOP and

View File

@ -0,0 +1,51 @@
---
- name: remove snap package
become: true
snap:
name: firefox
state: absent
- name: create keyrings directory
become: true
file:
path: /etc/apt/keyrings
mode: '755'
state: directory
- name: install mozilla repo keyring
become: true
get_url:
url: https://packages.mozilla.org/apt/repo-signing-key.gpg
dest: /etc/apt/keyrings/packages.mozilla.org.asc
- name: add mozilla apt repo
become: true
copy:
content: >-
deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc]
https://packages.mozilla.org/apt mozilla main
dest: /etc/apt/sources.list.d/mozilla.list
- name: pin mozilla package
become: true
copy:
content: |
Package: *
Pin: origin packages.mozilla.org
Pin-Priority: 1000
dest: /etc/apt/preferences.d/mozilla
- name: install mozilla package
become: true
apt:
name: firefox
state: latest
allow_downgrade: true
update_cache: true
- name: install gnome shell integration
when: "'GNOME' in ansible_env.XDG_CURRENT_DESKTOP"
become: true
apt:
name: chrome-gnome-shell
state: latest

View File

@ -1,2 +1,5 @@
--- ---
- include_tasks: '{{ansible_os_family}}.yaml' - include_tasks: Windows.yaml
when: ansible_os_family == 'Windows'
- include_tasks: Ubuntu.yaml
when: ansible_distribution == 'Ubuntu'