roles/common: Ignore errors removing snaps

If the snap binary doesn't even exist then it means we've probably
already run this playbook and removed all installed snaps as well.
This commit is contained in:
Alan Orth 2020-05-19 16:05:58 +03:00
parent ba3004ef2b
commit 40ac858d60

View File

@ -34,14 +34,17 @@
- name: Remove lxd snap
snap: name=lxd state=absent
when: ansible_distribution_version is version('20.04', '==')
ignore_errors: yes
- name: Remove core18 snap
snap: name=core18 state=absent
when: ansible_distribution_version is version('20.04', '==')
ignore_errors: yes
- name: Remove snapd snap
snap: name=snapd state=absent
when: ansible_distribution_version is version('20.04', '==')
ignore_errors: yes
- name: Set fact for packages to remove (Ubuntu <= 18.04)
set_fact: