aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.ansible/roles/cleanup/tasks/remove_package.yaml
blob: 27a6785440aaf42b662bf1e95b62a159eeabd89e (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
  ansible.builtin.shell: "dpkg --configure -a"
  when:
    - ansible_distribution == 'Ubuntu'
  tags:
    - remove-package

- name: Remove Package - {{ package }}
  ansible.builtin.apt:
    name: "{{ package }}"
    force: true
    purge: true
    state: "absent"
  failed_when: false
  when:
    - ansible_distribution == 'Ubuntu'
  tags:
    - remove-package