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'
|
|
|
|
|
2016-02-22 01:25:42 +08:00
|
|
|
- name: create bootstrap-osd directory
|
2015-11-17 23:10:02 +08:00
|
|
|
file:
|
|
|
|
path: /var/lib/ceph/bootstrap-osd/
|
|
|
|
state: directory
|
2016-02-22 01:25:42 +08:00
|
|
|
owner: "{{ dir_owner }}"
|
|
|
|
group: "{{ dir_group }}"
|
|
|
|
mode: "{{ dir_mode }}"
|
2015-11-20 22:09:34 +08:00
|
|
|
when:
|
2016-02-22 01:25:42 +08:00
|
|
|
cephx
|
2015-11-17 23:10:02 +08:00
|
|
|
|
2016-02-22 01:25:42 +08:00
|
|
|
- name: copy osd bootstrap key
|
2015-10-19 09:24:47 +08:00
|
|
|
copy:
|
2016-02-25 19:04:17 +08:00
|
|
|
src: "{{ fetch_directory }}/{{ fsid }}{{ item.name }}"
|
|
|
|
dest: "{{ item }}"
|
2016-02-22 01:25:42 +08:00
|
|
|
owner: "{{ key_owner }}"
|
|
|
|
group: "{{ key_group }}"
|
|
|
|
mode: "{{ key_mode }}"
|
2016-02-25 19:04:17 +08:00
|
|
|
with_items:
|
|
|
|
- { name: /var/lib/ceph/bootstrap-osd/ceph.keyring, copy: true }
|
|
|
|
- { name: /etc/ceph/client.admin.keyring, "{{ copy_admin_key }}" }
|
2015-11-20 22:09:34 +08:00
|
|
|
when:
|
2016-02-25 19:04:17 +08:00
|
|
|
cephx and
|
|
|
|
item.copy is true
|