From: Piotr Bak Date: Fri, 18 Jul 2014 14:43:00 +0000 (+0200) Subject: Fix for devices like /dev/cciss/c0d0, /dev/xvda X-Git-Tag: v1.0.0~341^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9a42f9d5bd172fb89dde8a3712fc26b07a8df39d;p=ceph-ansible.git Fix for devices like /dev/cciss/c0d0, /dev/xvda --- diff --git a/roles/ceph-osd/tasks/journal_collocation.yml b/roles/ceph-osd/tasks/journal_collocation.yml index 363c06d06..977cb6d0e 100644 --- a/roles/ceph-osd/tasks/journal_collocation.yml +++ b/roles/ceph-osd/tasks/journal_collocation.yml @@ -22,7 +22,7 @@ # - name: Check if the device is a partition or a disk - shell: echo '{{ item }}' | egrep '/dev/[a-z]{3}[0-9]$' + shell: echo '{{ item }}' | egrep '/dev/(([a-z]{3,4}[0-9]$)|(cciss/c[0-9]{1}d[0-9]{1}p[0-9]$))' ignore_errors: true with_items: devices register: ispartition @@ -71,7 +71,7 @@ # partition. - name: Activate OSD(s) when device is a disk - command: ceph-disk activate {{ item.2 }}1 + command: ceph-disk activate {{ item.2 | regex_replace('^(\/dev\/cciss\/c[0-9]{1}d[0-9]{1})$', '\\1p') }}1 with_together: - parted.results - ispartition.results