]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
purge-docker: remove osd disk prepare logs 2190/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 17:03:59 +0000 (18:03 +0100)
`with_fileglob` loops over files on the machine that runs the playbook.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit d9c1b61092db581428a2d22affbb6d71fa379a39)

infrastructure-playbooks/purge-docker-cluster.yml

index 54b860f4326fdd53bdc7c87792af5817c1a7dd58..8b78fa2e8b8e5dfa9769a5e6e8778e848fc69a4a 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