2015-01-21 01:43:47 +08:00
|
|
|
---
|
2015-05-16 00:27:41 +08:00
|
|
|
- name: install dependencies
|
2015-10-19 09:24:47 +08:00
|
|
|
apt:
|
|
|
|
pkg: parted
|
|
|
|
state: present
|
2015-01-21 01:43:47 +08:00
|
|
|
when: ansible_os_family == 'Debian'
|
|
|
|
|
2015-05-16 00:27:41 +08:00
|
|
|
- name: install dependencies
|
2015-10-19 09:24:47 +08:00
|
|
|
yum:
|
|
|
|
name: parted
|
|
|
|
state: present
|
2015-01-21 01:43:47 +08:00
|
|
|
when: ansible_os_family == 'RedHat'
|
|
|
|
|
2015-11-17 23:10:02 +08:00
|
|
|
- name: create bootstrap-osd directory (for or after infernalis release)
|
|
|
|
file:
|
|
|
|
path: /var/lib/ceph/bootstrap-osd/
|
|
|
|
state: directory
|
|
|
|
owner: ceph
|
|
|
|
group: ceph
|
|
|
|
mode: 0755
|
|
|
|
when:
|
|
|
|
cephx and
|
|
|
|
(ceph_stable_release != 'dumpling' or
|
|
|
|
ceph_stable_release != 'emperor' or
|
|
|
|
ceph_stable_release != 'firefly' or
|
|
|
|
ceph_stable_release != 'giant' or
|
|
|
|
ceph_stable_release != 'hammer')
|
|
|
|
|
|
|
|
- name: create bootstrap-osd directory (before infernalis release)
|
2015-11-06 04:39:03 +08:00
|
|
|
file:
|
|
|
|
path: /var/lib/ceph/bootstrap-osd/
|
|
|
|
state: directory
|
|
|
|
owner: root
|
|
|
|
group: root
|
2015-11-17 23:10:02 +08:00
|
|
|
mode: 0755
|
|
|
|
when:
|
|
|
|
cephx and
|
|
|
|
(ceph_stable_release == 'dumpling' or
|
|
|
|
ceph_stable_release == 'emperor' or
|
|
|
|
ceph_stable_release == 'firefly' or
|
|
|
|
ceph_stable_release == 'giant' or
|
|
|
|
ceph_stable_release == 'hammer')
|
|
|
|
|
|
|
|
- name: copy osd bootstrap key (for or after infernalis release)
|
|
|
|
copy:
|
|
|
|
src: "{{ fetch_directory }}/{{ fsid }}/var/lib/ceph/bootstrap-osd/ceph.keyring"
|
|
|
|
dest: /var/lib/ceph/bootstrap-osd/ceph.keyring
|
|
|
|
owner: ceph
|
|
|
|
group: ceph
|
|
|
|
mode: 0600
|
|
|
|
when:
|
|
|
|
cephx and
|
|
|
|
(ceph_stable_release != 'dumpling' or
|
|
|
|
ceph_stable_release != 'emperor' or
|
|
|
|
ceph_stable_release != 'firefly' or
|
|
|
|
ceph_stable_release != 'giant' or
|
|
|
|
ceph_stable_release != 'hammer')
|
2015-11-06 04:39:03 +08:00
|
|
|
|
2015-11-17 23:10:02 +08:00
|
|
|
- name: copy osd bootstrap key (before infernalis release)
|
2015-10-19 09:24:47 +08:00
|
|
|
copy:
|
|
|
|
src: "{{ fetch_directory }}/{{ fsid }}/var/lib/ceph/bootstrap-osd/ceph.keyring"
|
|
|
|
dest: /var/lib/ceph/bootstrap-osd/ceph.keyring
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 600
|
2015-11-17 23:10:02 +08:00
|
|
|
when:
|
|
|
|
cephx and
|
|
|
|
(ceph_stable_release == 'dumpling' or
|
|
|
|
ceph_stable_release == 'emperor' or
|
|
|
|
ceph_stable_release == 'firefly' or
|
|
|
|
ceph_stable_release == 'giant' or
|
|
|
|
ceph_stable_release == 'hammer')
|