move create ceph initial directories to default

This is needed for both non-container and container deployments.

Signed-off-by: Sébastien Han <seb@redhat.com>
pull/2541/head
Sébastien Han 2018-04-13 17:56:06 +02:00
parent 66c1ea8cd5
commit f3656ad167
4 changed files with 28 additions and 23 deletions

View File

@ -1,20 +0,0 @@
---
- 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
- /var/lib/ceph/bootstrap-rbd

View File

@ -98,9 +98,6 @@
- ceph_current_fsid.rc == 0
- mon_group_name in group_names
- name: include create_ceph_initial_dirs.yml
include: create_ceph_initial_dirs.yml
- name: include create_rbd_client_dir.yml
include: create_rbd_client_dir.yml

View File

@ -0,0 +1,25 @@
---
- name: set_fact ceph_directories
set_fact:
ceph_directories:
- /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
- /var/lib/ceph/bootstrap-rbd
- /var/run/ceph
- name: create ceph initial directories
file:
path: "{{ item }}"
state: directory
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
mode: 0755
with_items: "{{ ceph_directories }}"

View File

@ -4,3 +4,6 @@
- name: include facts.yml
include: facts.yml
- name: include create_ceph_initial_dirs.yml
include: create_ceph_initial_dirs.yml