ceph-ansible/roles/ceph-osd/tasks/activate_osds.yml

31 lines
878 B
YAML
Raw Normal View History

2014-09-05 03:14:11 +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.
- name: activate osd(s) when device is a disk
2015-10-19 09:24:47 +08:00
command: ceph-disk activate {{ item.1 | regex_replace('^(\/dev\/cciss\/c[0-9]{1}d[0-9]{1})$', '\\1p') }}1
2014-09-05 03:14:11 +08:00
with_together:
- ispartition.results
- devices
changed_when: false
failed_when: false
when: item.0.rc != 0
2014-09-05 03:14:11 +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
changed_when: false
failed_when: false
2014-09-05 03:14:11 +08:00
when: item.0.rc == 0
- include: osd_fragment.yml
when: crush_location
- name: start and add that the osd service(s) to the init sequence
2015-10-19 09:24:47 +08:00
service:
name: ceph
state: started
enabled: yes