aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.ansible/roles/cleanup/tasks/remove_package.yaml
blob: 302b43c99a007a4e3ce22bfd4a9b076d8dbbe463 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
---
# file: roles/cleanup/tasks/remove_package.yaml

- name: Remove Package - Fix Corrupted APT
  shell: "dpkg --configure -a"
  when:
    - ansible_distribution == 'Ubuntu'
  tags:
    - remove-package

- name: Remove Package - {{ package }}
  apt:
    name: "{{ package }}"
    force: yes
    purge: yes
    state: "absent"
  failed_when: no
  when:
    - ansible_distribution == 'Ubuntu'
  tags:
    - remove-package