From: Boris Ranto Date: Fri, 6 Oct 2017 20:54:34 +0000 (+0200) Subject: purge-cluster: Do not use shell for rm X-Git-Tag: v3.0.0rc19~1^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F2013%2Fhead;p=ceph-ansible.git purge-cluster: Do not use shell for rm 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 --- diff --git a/infrastructure-playbooks/purge-cluster.yml b/infrastructure-playbooks/purge-cluster.yml index d6bf5db46..d51030756 100644 --- a/infrastructure-playbooks/purge-cluster.yml +++ b/infrastructure-playbooks/purge-cluster.yml @@ -692,7 +692,10 @@ 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'