From 7277a553fa46f788e4a935c68fe7677e92059d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Mon, 30 Jan 2017 11:05:01 +0100 Subject: [PATCH] common: create ceph initial directories MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (cherry picked from commit 1149825f8f5498b09fc26bb52da99c82db68c8e5) --- .../tasks/create_ceph_initial_dirs.yml | 19 +++++++++++++++++++ roles/ceph-common/tasks/main.yml | 1 + 2 files changed, 20 insertions(+) create mode 100644 roles/ceph-common/tasks/create_ceph_initial_dirs.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 index 000000000..49db42d43 --- /dev/null +++ b/roles/ceph-common/tasks/create_ceph_initial_dirs.yml @@ -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 diff --git a/roles/ceph-common/tasks/main.yml b/roles/ceph-common/tasks/main.yml index e0e388f59..217d48757 100644 --- a/roles/ceph-common/tasks/main.yml +++ b/roles/ceph-common/tasks/main.yml @@ -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