aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.ansible/roles/cleanup/tasks/remove_package.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'fdio.infra.ansible/roles/cleanup/tasks/remove_package.yaml')
-rw-r--r--fdio.infra.ansible/roles/cleanup/tasks/remove_package.yaml21
1 files changed, 21 insertions, 0 deletions
diff --git a/fdio.infra.ansible/roles/cleanup/tasks/remove_package.yaml b/fdio.infra.ansible/roles/cleanup/tasks/remove_package.yaml
new file mode 100644
index 0000000000..652729bc30
--- /dev/null
+++ b/fdio.infra.ansible/roles/cleanup/tasks/remove_package.yaml
@@ -0,0 +1,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 \ No newline at end of file