mirror of https://github.com/ceph/ceph-ansible.git
48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
---
|
|
# 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)
|
|
mount:
|
|
name: /mnt
|
|
src: /dev/vdb
|
|
fstype: ext3
|
|
state: unmounted
|
|
when:
|
|
- ceph_docker_on_openstack
|
|
|
|
- name: test if the container image has the disk_list function
|
|
command: docker run --rm --entrypoint=stat {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} disk_list.sh
|
|
changed_when: false
|
|
failed_when: false
|
|
register: disk_list
|
|
|
|
- name: generate ceph osd docker run script
|
|
become: true
|
|
template:
|
|
src: "{{ role_path }}/templates/ceph-osd-run.sh.j2"
|
|
dest: "{{ ceph_osd_docker_run_script_path }}/ceph-osd-run.sh"
|
|
owner: "root"
|
|
group: "root"
|
|
mode: "0744"
|
|
notify:
|
|
- restart ceph osds
|
|
|
|
- name: generate systemd unit file
|
|
become: true
|
|
template:
|
|
src: "{{ role_path }}/templates/ceph-osd.service.j2"
|
|
dest: /etc/systemd/system/ceph-osd@.service
|
|
owner: "root"
|
|
group: "root"
|
|
mode: "0644"
|
|
notify:
|
|
- restart ceph osds
|
|
|
|
- name: systemd start osd container
|
|
systemd:
|
|
name: ceph-osd@{{ item | regex_replace('/dev/', '') }}
|
|
state: started
|
|
enabled: yes
|
|
daemon_reload: yes
|
|
with_items: "{{ devices }}"
|