vm-ansible/roles/common/tasks/remove-snap.yaml

20 lines
403 B
YAML
Raw Normal View History

---
- name: Remove snapd from Ubuntu
2023-03-05 19:00:38 +01:00
ansible.builtin.apt:
name: snapd
state: absent
purge: yes
when: ansible_distribution == "Ubuntu"
- name: Remove snapd-related directories
2023-03-05 19:00:38 +01:00
ansible.builtin.file:
path: "{{ item }}"
state: absent
with_items:
- /snap
- /var/snap
- /var/lib/snapd
- "/home/{{ ansible_user }}/snap"
2022-04-16 19:55:29 +02:00
when: ansible_distribution == "Ubuntu"
...