Add support for using loopback devices as OSDs

This is particularly useful in CI environments where you dont have
the option of adding extra devices or volumes to the host. It is also
a simple change to support loopback devices
pull/2215/head
Caleb Boylan 2017-11-27 16:02:36 -08:00
parent 3c6f2854fe
commit 8f02bb007f
1 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@
# partition.
- name: activate osd(s) when device is a disk
command: ceph-disk activate {{ item | regex_replace('^(\/dev\/cciss\/c[0-9]{1}d[0-9]{1})$', '\\1p') }}1
command: ceph-disk activate "{{ item | regex_replace('^(\/dev\/cciss\/c[0-9]{1}d[0-9]{1})$', '\1p') | regex_replace('^(\/dev\/loop[0-9]{1})$', '\1p') }}1"
with_items:
- "{{ devices|unique }}"
changed_when: false
@ -13,7 +13,7 @@
- not dmcrypt
- name: activate osd(s) when device is a disk (dmcrypt)
command: ceph-disk activate --dmcrypt {{ item | regex_replace('^(\/dev\/cciss\/c[0-9]{1}d[0-9]{1})$', '\\1p') }}1
command: ceph-disk activate --dmcrypt "{{ item | regex_replace('^(\/dev\/cciss\/c[0-9]{1}d[0-9]{1})$', '\1p') | regex_replace('^(\/dev\/loop[0-9]{1})$', '\1p') }}1"
with_items:
- "{{ devices|unique }}"
changed_when: false