Add no-snap
This commit is contained in:
parent
10b33df889
commit
be0fa13c16
6
roles/no-snap/files/etc/apt/preferences.d/no-snap
Normal file
6
roles/no-snap/files/etc/apt/preferences.d/no-snap
Normal 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
|
14
roles/no-snap/tasks/main.yml
Normal file
14
roles/no-snap/tasks/main.yml
Normal 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'
|
Loading…
Reference in New Issue
Block a user