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 <branto@redhat.com>
pull/2013/head
Boris Ranto 2017-10-06 22:54:34 +02:00
parent f696cb7637
commit 64e272d818
1 changed files with 4 additions and 1 deletions

View File

@ -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'