only do ls on directory that exists

pull/603/head
Ben England 2016-03-13 09:26:34 -04:00
parent f643209999
commit f67e4e6bf5
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@
tasks:
- name: get osd numbers
shell: ls /var/lib/ceph/osd | cut -d "-" -f 2
shell: "if [ -d /var/lib/ceph/osd ] ; then ls /var/lib/ceph/osd | cut -d '-' -f 2 ; fi"
register: osd_ids
changed_when: false