Sometimes users for testing, tend to delete the whole /var/lib/ceph and
then run ansible again, OSD will never come up if we do not create their
directory.
Signed-off-by: Sébastien Han <seb@redhat.com>
name: parted
state: present
-- name: create bootstrap-osd directory
+- name: create bootstrap-osd and osd directories
file:
- path: /var/lib/ceph/bootstrap-osd/
+ path: "{{ item }}"
state: directory
owner: "{{ dir_owner }}"
group: "{{ dir_group }}"
mode: "{{ dir_mode }}"
- when:
- cephx
+ when: cephx
+ with_items:
+ - /var/lib/ceph/bootstrap-osd/
+ - /var/lib/ceph/osd/
- name: copy ceph admin key when using dmcrypt
set_fact: