]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
Don't try to remove a missing package
authorZack Cerza <zack@redhat.com>
Mon, 6 Jul 2015 23:00:26 +0000 (17:00 -0600)
committerZack Cerza <zack@redhat.com>
Mon, 6 Jul 2015 23:00:26 +0000 (17:00 -0600)
My previous commit had a bug. First, check if ceph-debuginfo is present.
If it's not, don't try to remove it.

Signed-off-by: Zack Cerza <zack@redhat.com>
roles/testnode/tasks/yum/packages.yml

index 5b7f10cd38108c8bdda1747122855c12f24e6197..891b452bad4ff2a4d187c56796482d3a7d3b72b5 100644 (file)
@@ -1,6 +1,15 @@
 ---
+- name: Check if ceph-debuginfo is installed
+  command: rpm -q ceph-debuginfo
+  ignore_errors: yes
+  changed_when: false
+  register: bz1234967
+  tags:
+    - remove-ceph
+
 - name: Work around https://bugzilla.redhat.com/show_bug.cgi?id=1234967
   command: rpm -e ceph-debuginfo
+  when: bz1234967 is defined and bz1234967.rc == 0
   tags:
     - remove-ceph