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