-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCUPS_remove.yaml
47 lines (44 loc) · 1.07 KB
/
CUPS_remove.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
- name: Playbook to remove CUPS related folders and packages
hosts: all
gather_facts: true
become: true
vars:
ansible_python_interpreter: /usr/bin/python3
tasks:
- name: GENERAL | remove packages
ansible.builtin.package:
name:
- cups
- cups-bsd
- cups-client
- cups-common
- cups-core-drivers
- cups-daemon
- cups-filters
- cups-filters-core-drivers
- cups-ppdc
- cups-server-common
- cups-browsed
state: absent
- name: SNAP | remove packages
community.general.snap:
name:
- cups-proxyd
- cups-browsed
- cups
state: absent
failed_when: false
when:
- "'snap' in ansible_env.PATH"
- name: GENERAL | Remove multiple directories
ansible.builtin.file:
path: "{{ item }}"
state: absent
loop:
- /etc/cups
- /var/spool/cups
- /var/cache/cups
- /var/log/cups
- /var/lib/cups
- /var/snap/cups