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

- name: 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