2023-07-03 21:57:07 +00:00
|
|
|
- become: yes
|
|
|
|
block:
|
|
|
|
- name: Gather the package facts
|
|
|
|
ansible.builtin.package_facts:
|
|
|
|
manager: auto
|
|
|
|
|
|
|
|
- name: remove snap
|
|
|
|
community.general.snap:
|
2024-04-19 18:55:06 +00:00
|
|
|
name: firefox
|
2023-07-03 21:57:07 +00:00
|
|
|
state: absent
|
|
|
|
when:
|
2023-08-22 19:10:54 +00:00
|
|
|
- "'snapd' in ansible_facts.packages"
|
2024-04-19 18:55:06 +00:00
|
|
|
- "'firefox' in ansible_facts.packages"
|
|
|
|
- ansible_facts.packages['firefox'][0].version == "1:1snap1-0ubuntu2"
|
|
|
|
|
|
|
|
- name: remove snap
|
|
|
|
community.general.snap:
|
|
|
|
name: firefox
|
|
|
|
state: disabled
|
|
|
|
when:
|
|
|
|
- "'snapd' in ansible_facts.packages"
|
|
|
|
- "'firefox' in ansible_facts.packages"
|
|
|
|
- ansible_facts.packages['firefox'][0].version == "1:1snap1-0ubuntu2"
|
2023-07-03 21:57:07 +00:00
|
|
|
|
|
|
|
- name: remove apt snap wrapper version
|
|
|
|
apt:
|
|
|
|
state: absent
|
|
|
|
pkg:
|
2024-04-19 18:55:06 +00:00
|
|
|
- firefox
|
2023-07-03 21:57:07 +00:00
|
|
|
when:
|
2024-04-19 18:55:06 +00:00
|
|
|
- "'firefox' in ansible_facts.packages"
|
|
|
|
- ansible_facts.packages['firefox'][0].version == "1:1snap1-0ubuntu2"
|
2023-07-03 21:57:07 +00:00
|
|
|
|
2024-04-19 18:55:06 +00:00
|
|
|
- name: Add linux mint source list
|
|
|
|
ansible.builtin.apt_repository:
|
2023-07-03 21:57:07 +00:00
|
|
|
repo: deb http://packages.linuxmint.com vera upstream
|
|
|
|
state: present
|
|
|
|
|
2024-04-19 18:55:06 +00:00
|
|
|
- name: set linux mint for higher priority
|
|
|
|
copy:
|
|
|
|
src: etc/apt/preferences.d/mint-firefox
|
|
|
|
dest: /etc/apt/preferences.d/mint-firefox
|
|
|
|
|
|
|
|
- name: Remove unattended upgrades
|
|
|
|
file:
|
|
|
|
path: /etc/apt/apt.conf.d/51unattended-upgrades-firefox
|
|
|
|
state: absent
|
|
|
|
|
|
|
|
- name: Remove mozilla ppa
|
|
|
|
apt_repository:
|
|
|
|
repo: ppa:mozillateam/ppa
|
|
|
|
state: absent
|
|
|
|
|
|
|
|
- name: install equivs
|
|
|
|
apt:
|
|
|
|
update_cache: yes
|
|
|
|
state: latest
|
|
|
|
pkg:
|
|
|
|
- equivs
|
|
|
|
|
|
|
|
- name: copy fakepackage to satisfy dependencies
|
2023-07-03 21:57:07 +00:00
|
|
|
copy:
|
2024-04-19 18:55:06 +00:00
|
|
|
src: tmp/fakepkg
|
|
|
|
dest: /tmp/fakepkg
|
|
|
|
|
|
|
|
- name: make fake ubuntu-system-adjustments package
|
|
|
|
shell:
|
|
|
|
cmd: equivs-build /tmp/fakepkg
|
|
|
|
chdir: /tmp
|
|
|
|
|
|
|
|
- name: Install a .deb package
|
|
|
|
ansible.builtin.apt:
|
|
|
|
deb: /tmp/ubuntu-system-adjustments_2021.12.16_all.deb
|
2023-07-03 21:57:07 +00:00
|
|
|
|
2024-04-19 18:55:06 +00:00
|
|
|
- name: install browser
|
2023-07-03 21:57:07 +00:00
|
|
|
apt:
|
2024-04-19 18:55:06 +00:00
|
|
|
allow_downgrade: true
|
2023-07-03 21:57:07 +00:00
|
|
|
update_cache: yes
|
2024-04-19 18:55:06 +00:00
|
|
|
state: latest
|
2023-07-03 21:57:07 +00:00
|
|
|
pkg:
|
2024-04-19 18:55:06 +00:00
|
|
|
- firefox
|
|
|
|
|
|
|
|
- name: Set firefox as x-www-browser
|
|
|
|
command: update-alternatives --set x-www-browser /usr/bin/firefox
|
|
|
|
|
|
|
|
- name: update xdg default-web-browser
|
|
|
|
command: xdg-settings set default-web-browser firefox.desktop
|