ceph-ansible/roles/ceph-osd/tasks/pre_requisite.yml

57 lines
1.3 KiB
YAML
Raw Normal View History

---
- name: install dependencies
2015-10-19 09:24:47 +08:00
apt:
pkg: parted
state: present
when: ansible_os_family == 'Debian'
- name: install dependencies
2015-10-19 09:24:47 +08:00
yum:
name: parted
state: present
when: ansible_os_family == 'RedHat'
- 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
is_ceph_infernalis
- name: create bootstrap-osd directory (before infernalis release)
file:
path: /var/lib/ceph/bootstrap-osd/
state: directory
owner: root
group: root
mode: 0755
when:
cephx and
not is_ceph_infernalis
- 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
is_ceph_infernalis
- 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
when:
cephx and
not is_ceph_infernalis