mirror of https://github.com/ceph/ceph-ansible.git
52 lines
1.3 KiB
YAML
52 lines
1.3 KiB
YAML
---
|
|
# NOTE (leseb): we can not use docker inspect with 'format filed' because of
|
|
# https://github.com/ansible/ansible/issues/10156
|
|
- name: inspect ceph version
|
|
shell: docker inspect "{{ ceph_nfs_docker_username }}/{{ ceph_nfs_docker_imagename }}:{{ ceph_nfs_docker_image_tag }}" | awk -F '=' '/CEPH_VERSION/ { gsub ("\",", "", $2); print $2 }' | uniq
|
|
changed_when: false
|
|
failed_when: false
|
|
run_once: true
|
|
register: ceph_version
|
|
|
|
- set_fact:
|
|
after_hammer=True
|
|
when: ceph_version.stdout not in ['firefly','giant', 'hammer']
|
|
|
|
- name: create bootstrap directories (for or before hammer)
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: "0755"
|
|
with_items:
|
|
- /etc/ceph/
|
|
- /var/lib/ceph/
|
|
- /var/lib/ceph/radosgw
|
|
when: not after_hammer
|
|
|
|
- name: create bootstrap directories (after hammer)
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
owner: "64045"
|
|
group: "64045"
|
|
mode: "0755"
|
|
with_items:
|
|
- /etc/ceph/
|
|
- /var/lib/ceph/
|
|
- /var/lib/ceph/radosgw
|
|
when: after_hammer
|
|
|
|
- name: create ganesha directories
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: "0755"
|
|
with_items:
|
|
- /etc/ganesha/
|
|
- /var/lib/nfs/ganesha
|
|
- /var/run/ganesha
|