]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
common: create ceph initial directories
authorSébastien Han <seb@redhat.com>
Mon, 30 Jan 2017 10:05:01 +0000 (11:05 +0100)
committerSébastien Han <seb@redhat.com>
Mon, 30 Jan 2017 13:31:56 +0000 (14:31 +0100)
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>
roles/ceph-common/tasks/create_ceph_initial_dirs.yml [new file with mode: 0644]
roles/ceph-common/tasks/main.yml

diff --git a/roles/ceph-common/tasks/create_ceph_initial_dirs.yml b/roles/ceph-common/tasks/create_ceph_initial_dirs.yml
new file mode 100644 (file)
index 0000000..49db42d
--- /dev/null
@@ -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
index e0e388f59625d6c30898735d2902e59708b4d656..217d48757ef09fa41d49bcad7d8d9c40066e9d5f 100644 (file)
@@ -88,6 +88,7 @@
 
 - include: facts.yml
 - include: ./checks/check_socket.yml
+- include: create_ceph_initial_dirs.yml
 - include: generate_cluster_fsid.yml
 - include: generate_ceph_conf.yml
 - include: create_rbd_client_dir.yml