mirror of https://github.com/ceph/ceph-ansible.git
Fix the sudoer template
+ cleanup the docker.yml from OSD. Signed-off-by: Sébastien Han <seb@redhat.com>pull/366/head
parent
9c5574f826
commit
f671e91e61
|
@ -1,52 +0,0 @@
|
||||||
---
|
|
||||||
- name: set config and keys paths
|
|
||||||
set_fact:
|
|
||||||
ceph_config_keys:
|
|
||||||
- /etc/ceph/ceph.client.admin.keyring
|
|
||||||
- /etc/ceph/ceph.conf
|
|
||||||
- /etc/ceph/monmap
|
|
||||||
- /etc/ceph/ceph.mon.keyring
|
|
||||||
- /var/lib/ceph/bootstrap-osd/ceph.keyring
|
|
||||||
|
|
||||||
# NOTE (leseb): force version 1.1.0 because https://github.com/ansible/ansible-modules-core/issues/1227
|
|
||||||
- name: install docker-py
|
|
||||||
pip: >
|
|
||||||
name=docker-py
|
|
||||||
version=1.1.0
|
|
||||||
|
|
||||||
- name: stat for ceph config and keys
|
|
||||||
stat: >
|
|
||||||
path={{ item }}
|
|
||||||
with_items: ceph_config_keys
|
|
||||||
failed_when: false
|
|
||||||
register: statconfig
|
|
||||||
|
|
||||||
- name: try to fetch ceph config and keys
|
|
||||||
copy: >
|
|
||||||
src=fetch/docker_mon_files/"{{ item }}"
|
|
||||||
dest=/etc/ceph/
|
|
||||||
owner=root
|
|
||||||
group=root
|
|
||||||
mode=600
|
|
||||||
with_together:
|
|
||||||
- ceph_config_keys
|
|
||||||
- statconfig.results
|
|
||||||
when: item.1.stat.exists == true
|
|
||||||
|
|
||||||
- name: run the ceph osd docker image
|
|
||||||
docker: >
|
|
||||||
image="{{ ceph_osd_docker_username }}/{{ ceph_osd_docker_imagename }}"
|
|
||||||
name={{ ansible_hostname }}-osd-{{ item | regex_replace('/', '') }}
|
|
||||||
net=host
|
|
||||||
state=running
|
|
||||||
privileged=yes
|
|
||||||
env="CEPH_DAEMON=OSD_CEPH_DISK,OSD_DEVICE={{ item }}"
|
|
||||||
volumes="/var/lib/ceph:/var/lib/ceph,/etc/ceph:/etc/ceph,/dev/:/dev/"
|
|
||||||
with_items: ceph_osd_docker_devices
|
|
||||||
|
|
||||||
- name: ensure ceph_osd service is running
|
|
||||||
docker: >
|
|
||||||
image="{{ ceph_osd_docker_username }}/{{ ceph_osd_docker_imagename }}"
|
|
||||||
name={{ ansible_hostname }}-osd-{{ item | regex_replace('/', '') }}
|
|
||||||
state=started
|
|
||||||
with_items: ceph_osd_docker_devices
|
|
Loading…
Reference in New Issue