2015-07-28 22:05:35 +08:00
|
|
|
---
|
2016-02-05 04:24:56 +08:00
|
|
|
# For openstack VMs modify the mount point below depending on if the Openstack
|
|
|
|
# VM deploy tool defaults to mounting ephemeral disks
|
|
|
|
- name: umount ceph disk (if on openstack)
|
2016-03-22 23:58:20 +08:00
|
|
|
mount:
|
2016-02-20 03:46:33 +08:00
|
|
|
name: /mnt
|
|
|
|
src: /dev/vdb
|
|
|
|
fstype: ext3
|
|
|
|
state: unmounted
|
2017-09-15 06:48:53 +08:00
|
|
|
when:
|
|
|
|
- ceph_docker_on_openstack
|
2016-03-22 23:58:20 +08:00
|
|
|
|
2017-02-08 05:00:53 +08:00
|
|
|
- name: generate ceph osd docker run script
|
|
|
|
become: true
|
|
|
|
template:
|
|
|
|
src: "{{ role_path }}/templates/ceph-osd-run.sh.j2"
|
2017-02-17 05:13:26 +08:00
|
|
|
dest: "{{ ceph_osd_docker_run_script_path }}/ceph-osd-run.sh"
|
2017-02-08 05:00:53 +08:00
|
|
|
owner: "root"
|
|
|
|
group: "root"
|
|
|
|
mode: "0744"
|
|
|
|
|
2016-02-10 01:35:41 +08:00
|
|
|
- name: generate systemd unit file
|
2016-03-22 23:58:20 +08:00
|
|
|
become: true
|
2016-02-10 03:49:22 +08:00
|
|
|
template:
|
2016-06-02 16:52:23 +08:00
|
|
|
src: "{{ role_path }}/templates/ceph-osd.service.j2"
|
2016-06-28 19:48:46 +08:00
|
|
|
dest: /etc/systemd/system/ceph-osd@.service
|
2016-02-10 01:35:41 +08:00
|
|
|
owner: "root"
|
|
|
|
group: "root"
|
|
|
|
mode: "0644"
|
|
|
|
|
|
|
|
- name: systemd start osd container
|
2017-09-29 20:54:00 +08:00
|
|
|
systemd:
|
2016-02-10 01:35:41 +08:00
|
|
|
name: ceph-osd@{{ item | basename }}
|
|
|
|
state: started
|
|
|
|
enabled: yes
|
2017-09-29 20:54:00 +08:00
|
|
|
daemon_reload: yes
|
2016-02-10 01:35:41 +08:00
|
|
|
changed_when: false
|
2017-07-25 23:54:26 +08:00
|
|
|
with_items: "{{ devices }}"
|