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