This is needed for both non-container and container deployments.
Signed-off-by: Sébastien Han <seb@redhat.com>
+++ /dev/null
----
-- 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
- 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
--- /dev/null
+---
+- 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 }}"
- name: include facts.yml
include: facts.yml
+
+- name: include create_ceph_initial_dirs.yml
+ include: create_ceph_initial_dirs.yml
\ No newline at end of file