From 64e272d8180f6704b0d3b257009f5d09682f3403 Mon Sep 17 00:00:00 2001 From: Boris Ranto Date: Fri, 6 Oct 2017 22:54:34 +0200 Subject: [PATCH] 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 --- infrastructure-playbooks/purge-cluster.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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' -- 2.39.5