osd: make sure osd directory exists

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>
(cherry picked from commit 6f53774ee9)
pull/1259/head
Sébastien Han 2017-01-27 11:10:21 +01:00 committed by Andrew Schoen
parent 1b97602776
commit fa0fdee2c0
1 changed files with 6 additions and 4 deletions

View File

@ -12,15 +12,17 @@
name: parted name: parted
state: present state: present
- name: create bootstrap-osd directory - name: create bootstrap-osd and osd directories
file: file:
path: /var/lib/ceph/bootstrap-osd/ path: "{{ item }}"
state: directory state: directory
owner: "{{ dir_owner }}" owner: "{{ dir_owner }}"
group: "{{ dir_group }}" group: "{{ dir_group }}"
mode: "{{ dir_mode }}" mode: "{{ dir_mode }}"
when: when: cephx
cephx with_items:
- /var/lib/ceph/bootstrap-osd/
- /var/lib/ceph/osd/
- name: copy ceph admin key when using dmcrypt - name: copy ceph admin key when using dmcrypt
set_fact: set_fact: