--- # NOTE (leseb) : this task is for disk devices only because of the explicit use of the first # partition. - name: activate OSD(s) when device is a disk 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 - devices changed_when: false ignore_errors: true when: item.0.rc == 0 and item.1.rc != 0 # NOTE (leseb): this task is for partitions because we don't explicitly use a partition. - name: activate OSD(s) when device is a partition command: "ceph-disk activate {{ item.1 }}" with_together: - ispartition.results - devices changed_when: false ignore_errors: true when: item.0.rc == 0 - include: osd_fragment.yml when: crush_location - name: start and add that the OSD service to the init sequence service: > name=ceph state=started enabled=yes