LTS: Performance testing
[csit.git] / resources / tools / testbed-setup / ansible / roles / cleanup / tasks / remove_package.yaml
diff --git a/resources/tools/testbed-setup/ansible/roles/cleanup/tasks/remove_package.yaml b/resources/tools/testbed-setup/ansible/roles/cleanup/tasks/remove_package.yaml
new file mode 100644 (file)
index 0000000..0c8816f
--- /dev/null
@@ -0,0 +1,19 @@
+---
+# 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