aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools
diff options
context:
space:
mode:
Diffstat (limited to 'resources/tools')
-rw-r--r--resources/tools/testbed-setup/ansible/roles/cleanup/tasks/remove_package.yaml16
1 files changed, 2 insertions, 14 deletions
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
index 8f5ec8fefe..0c8816fe29 100644
--- a/resources/tools/testbed-setup/ansible/roles/cleanup/tasks/remove_package.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/cleanup/tasks/remove_package.yaml
@@ -7,25 +7,13 @@
ansible_distribution == 'Ubuntu'
tags: remove-package
-- name: Remove package - Check if {{ package }} is installed
- shell: >
- "dpkg-query -W -f='${Status}' {{ package }} | grep 'install ok installed'"
- register: package_is_installed
- failed_when: no
- changed_when: no
- when: >
- ansible_distribution == 'Ubuntu'
- tags: remove-package
-
- name: Remove package - {{ package }}
apt:
name: '{{ package }}'
force: yes
purge: yes
state: absent
+ failed_when: no
when: >
- package is defined and
- package != '' and
- package_is_installed.rc == 0 and
- ansible_distribution|lower == 'ubuntu'
+ ansible_distribution == 'Ubuntu'
tags: remove-package