FIX: Ansible remove vpp 95/23495/1
authorPeter Mikus <pmikus@cisco.com>
Mon, 18 Nov 2019 09:13:38 +0000 (09:13 +0000)
committerPeter Mikus <pmikus@cisco.com>
Mon, 18 Nov 2019 09:13:38 +0000 (09:13 +0000)
Signed-off-by: Peter Mikus <pmikus@cisco.com>
Change-Id: I054d2b282f67a465bb0f7ceacfe23d6283c88409

resources/tools/testbed-setup/ansible/roles/cleanup/tasks/remove_package.yaml

index 8f5ec8f..0c8816f 100644 (file)
@@ -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