]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
purge-docker: remove osd disk prepare logs 2184/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Thu, 16 Nov 2017 10:36:17 +0000 (11:36 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 16 Nov 2017 13:27:36 +0000 (14:27 +0100)
`with_fileglob` loops over files on the machine that runs the playbook.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
infrastructure-playbooks/purge-docker-cluster.yml

index 846cab95b159ea9b9711b0b9a89f7b0eb023fcf6..a2443b024fabdae6517eef3abb7b22f400a510e6 100644 (file)
         - "{{ 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