Update ubuntu-firefox to use linux mint packages
This commit is contained in:
parent
6a3110357f
commit
2eae70f36a
@ -0,0 +1,11 @@
|
|||||||
|
Package: *
|
||||||
|
Pin: release o=linuxmint
|
||||||
|
Pin-Priority: -1
|
||||||
|
|
||||||
|
Package: firefox*
|
||||||
|
Pin: release o=linuxmint
|
||||||
|
Pin-Priority: 1002
|
||||||
|
|
||||||
|
Package: firefox*
|
||||||
|
Pin: release o=linuxmint
|
||||||
|
Pin-Priority: 1002
|
7
roles/ubuntu-firefox/files/tmp/fakepkg
Normal file
7
roles/ubuntu-firefox/files/tmp/fakepkg
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
Section: misc
|
||||||
|
Priority: optional
|
||||||
|
Standards-Version: 3.9.2
|
||||||
|
Package: ubuntu-system-adjustments
|
||||||
|
Version: 2021.12.16
|
||||||
|
|
||||||
|
Description: Fake package to install firefox from linux mint
|
83
roles/ubuntu-firefox/tasks/linux-mint.yml
Normal file
83
roles/ubuntu-firefox/tasks/linux-mint.yml
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
- become: yes
|
||||||
|
block:
|
||||||
|
- name: Gather the package facts
|
||||||
|
ansible.builtin.package_facts:
|
||||||
|
manager: auto
|
||||||
|
|
||||||
|
- name: remove snap
|
||||||
|
community.general.snap:
|
||||||
|
name: firefox
|
||||||
|
state: absent
|
||||||
|
when:
|
||||||
|
- "'snapd' in ansible_facts.packages"
|
||||||
|
- "'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"
|
||||||
|
|
||||||
|
- name: remove apt snap wrapper version
|
||||||
|
apt:
|
||||||
|
state: absent
|
||||||
|
pkg:
|
||||||
|
- firefox
|
||||||
|
when:
|
||||||
|
- "'firefox' in ansible_facts.packages"
|
||||||
|
- ansible_facts.packages['firefox'][0].version == "1:1snap1-0ubuntu2"
|
||||||
|
|
||||||
|
- name: Add linux mint source list
|
||||||
|
ansible.builtin.apt_repository:
|
||||||
|
repo: deb http://packages.linuxmint.com vera upstream
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- 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
|
||||||
|
become: yes
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
state: latest
|
||||||
|
pkg:
|
||||||
|
- equivs
|
||||||
|
|
||||||
|
- name: copy fakepackage to satisfy dependencies
|
||||||
|
copy:
|
||||||
|
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
|
||||||
|
|
||||||
|
- name: install browser
|
||||||
|
become: yes
|
||||||
|
apt:
|
||||||
|
allow_downgrade: true
|
||||||
|
update_cache: yes
|
||||||
|
state: latest
|
||||||
|
pkg:
|
||||||
|
- firefox
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
- import_tasks: ppa.yml
|
- import_tasks: linux-mint.yml
|
||||||
when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int >= 22
|
when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int >= 22
|
||||||
|
|
||||||
- import_tasks: update-alternatives.yml
|
- import_tasks: update-alternatives.yml
|
||||||
|
Loading…
Reference in New Issue
Block a user