ansible-desktop/roles/ubuntu-firefox/tasks/ppa.yml

56 lines
1.5 KiB
YAML

- 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 ppa
apt_repository:
repo: ppa:mozillateam/ppa
- name: set mozillateam higher priority
copy:
src: etc/apt/preferences.d/mozillateamppa
dest: /etc/apt/preferences.d/mozillateamppa
- name: set mozillateam for unattended upgrades
copy:
src: etc/apt/apt.conf.d/51unattended-upgrades-firefox
dest: /etc/apt/apt.conf.d/51unattended-upgrades-firefox
- name: install browser
become: yes
apt:
allow_downgrade: true
update_cache: yes
state: latest
pkg:
- firefox