common: create ceph initial directories

Some users purge their environments and leave it in a non-optimal state.
e.g: packages are still installed but /etc/ceph and /var/lib/ceph don't
exist anymore. This will result in multiple failures across the play,
sometimes hard to detect. Populating these directories "just in case"
should help us solving these problems.

Closes: #1253
Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 1149825f8f)
pull/1259/head
Sébastien Han 2017-01-30 11:05:01 +01:00 committed by Andrew Schoen
parent b925147554
commit 7277a553fa
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,19 @@
---
- name: create ceph initial directories
file:
path: "{{ item }}"
state: directory
owner: ceph
group: ceph
mode: 0755
with_items:
- /etc/ceph
- /var/lib/ceph/
- /var/lib/ceph/mon
- /var/lib/ceph/osd
- /var/lib/ceph/mds
- /var/lib/ceph/tmp
- /var/lib/ceph/radosgw
- /var/lib/ceph/bootstrap-rgw
- /var/lib/ceph/bootstrap-mds
- /var/lib/ceph/bootstrap-osd

View File

@ -88,6 +88,7 @@
- include: facts.yml - include: facts.yml
- include: ./checks/check_socket.yml - include: ./checks/check_socket.yml
- include: create_ceph_initial_dirs.yml
- include: generate_cluster_fsid.yml - include: generate_cluster_fsid.yml
- include: generate_ceph_conf.yml - include: generate_ceph_conf.yml
- include: create_rbd_client_dir.yml - include: create_rbd_client_dir.yml