]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
purge-cluster: Do not use shell for rm 2013/head
authorBoris Ranto <branto@redhat.com>
Fri, 6 Oct 2017 20:54:34 +0000 (22:54 +0200)
committerBoris Ranto <branto@redhat.com>
Fri, 6 Oct 2017 20:54:37 +0000 (22:54 +0200)
The shell wildcard expansion of non-existing paths fails on zsh making
the whole script fail. We can use file module with with_fileglob to
alleviate the problem instead.

Signed-off-by: Boris Ranto <branto@redhat.com>
infrastructure-playbooks/purge-cluster.yml

index d6bf5db46a8494b1aaabe9a2b6d7b1d2f172ccf2..d5103075614d700bd82821a81bf7dd47079ab30c 100644 (file)
     failed_when: check_for_running_ceph.rc == 0
 
   - name: remove ceph systemd unit files
-    shell: rm -rf /etc/systemd/system/ceph*
+    file:
+      path: "{{ item }}"
+      state: absent
+    with_fileglob: /etc/systemd/system/ceph*
     changed_when: false
     when: ansible_service_mgr == 'systemd'