Fix firefox role

This commit is contained in:
Przemek Grondek 2022-09-03 15:53:24 +02:00
parent 9fa9cb3eee
commit 62dde7026c
2 changed files with 8 additions and 4 deletions

View File

@ -4,13 +4,17 @@
ansible.builtin.package_facts:
manager: auto
- name: Print the package facts
ansible.builtin.debug:
var: ansible_facts.packages
- name: remove snap
community.general.snap:
name: firefox
state: absent
when:
- 'firefox' in ansible_facts.packages
- ansible_facts.packages['firefox'].version == "1:1snap1-0ubuntu2"
- "'firefox' in ansible_facts.packages"
- ansible_facts.packages['firefox'][0].version == "1:1snap1-0ubuntu2"
- name: remove apt snap wrapper version
apt:
@ -18,8 +22,8 @@
pkg:
- firefox
when:
- 'firefox' in ansible_facts.packages
- ansible_facts.packages['firefox'].version == "1:1snap1-0ubuntu2"
- "'firefox' in ansible_facts.packages"
- ansible_facts.packages['firefox'][0].version == "1:1snap1-0ubuntu2"
- name: add ppa
apt_repository: