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

30 lines
798 B
YAML
Raw Normal View History

---
- name: fetch Ceph config and keys
copy: >
src=fetch/docker_mon_files/{{ item }}
dest=/etc/ceph/
owner=root
group=root
mode=600
with_items:
- /etc/ceph/ceph.client.admin.keyring
- /etc/ceph/ceph.conf
- /etc/ceph/monmap
- /etc/ceph/ceph.mon.keyring
- name: run the Ceph OSD docker image
docker: >
image="{{ ceph_osd_docker_username }}/{{ ceph_osd_docker_imagename }}"
name=ceph-{{ ansible_hostname }}
net=host
state=running
env="OSD_NAME=ceph-{{ ansible_hostname }}"
volumes="/var/lib/ceph:/var/lib/ceph,/etc/ceph:/etc/ceph"
- name: ensure ceph_osd service is running
docker: >
image="{{ ceph_osd_docker_username }}/{{ ceph_osd_docker_imagename }}"
name="ceph-{{ ansible_hostname }}"
detach=yes
state=running