This commit is contained in:
2021-11-09 01:13:48 +01:00
commit 034e8ef0a7
7 changed files with 98 additions and 0 deletions

17
tasks/remove-snap.yaml Normal file
View File

@@ -0,0 +1,17 @@
- name: Remove snapd from Ubuntu
apt:
name: snapd
state: absent
purge: yes
when: ansible_distribution == "Ubuntu"
- name: Remove snapd-related directories
file:
path: "{{ item }}"
state: absent
with_items:
- /snap
- /var/snap
- /var/lib/snapd
- "/home/{{ ansible_user }}/snap"
when: ansible_distribution == "Ubuntu"