From d9c1b61092db581428a2d22affbb6d71fa379a39 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Thu, 16 Nov 2017 11:36:17 +0100 Subject: [PATCH] purge-docker: remove osd disk prepare logs `with_fileglob` loops over files on the machine that runs the playbook. Signed-off-by: Guillaume Abrioux --- infrastructure-playbooks/purge-docker-cluster.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/infrastructure-playbooks/purge-docker-cluster.yml b/infrastructure-playbooks/purge-docker-cluster.yml index 846cab95b..a2443b024 100644 --- a/infrastructure-playbooks/purge-docker-cluster.yml +++ b/infrastructure-playbooks/purge-docker-cluster.yml @@ -446,12 +446,18 @@ - "{{ playbook_dir }}/group_vars/osds.yml" skip: true + - name: find all osd_disk_prepare logs + find: + paths: "{{ ceph_osd_docker_run_script_path | default('/usr/share') }}" + pattern: "ceph-osd-prepare-*.log" + register: osd_disk_prepare_logs + - name: ensure all osd_disk_prepare logs are removed file: - path: "{{ item }}" + path: "{{ item.path }}" state: absent - with_fileglob: - - "{{ ceph_osd_docker_run_script_path | default('/usr/share') }}/ceph-osd-prepare-*.log" + with_items: + - "{{ osd_disk_prepare_logs.files }}" - name: purge ceph mon cluster