Add no-snap

This commit is contained in:
Przemek Grondek 2023-08-06 11:00:54 +02:00
parent 10b33df889
commit be0fa13c16
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,6 @@
# To prevent repository packages from triggering the installation of snap,
# this file forbids snapd from being installed by APT.
Package: snapd
Pin: release a=*
Pin-Priority: -10

View File

@ -0,0 +1,14 @@
- name: remove snap
become: yes
apt:
state: absent
purge: yes
pkg:
- snapd
- name: Forbid apt to install snap
become: yes
copy:
src: etc/apt/preferences.d/no-snap
dest: /etc/apt/preferences.d/no-snap
mode: '0644'