2015-01-21 01:43:47 +08:00
|
|
|
---
|
2016-06-16 22:06:31 +08:00
|
|
|
- name: install debian 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'
|
|
|
|
|
2016-06-16 22:06:31 +08:00
|
|
|
- name: install redhat dependencies via yum
|
2015-10-19 09:24:47 +08:00
|
|
|
yum:
|
|
|
|
name: parted
|
|
|
|
state: present
|
2016-06-16 22:06:31 +08:00
|
|
|
when:
|
|
|
|
- ansible_os_family == 'RedHat'
|
|
|
|
- ansible_pkg_mgr == "yum"
|
|
|
|
|
|
|
|
- name: install redhat rependencies via dnf
|
|
|
|
dnf:
|
|
|
|
name: parted
|
|
|
|
state: present
|
|
|
|
when:
|
|
|
|
- ansible_os_family == 'RedHat'
|
|
|
|
- ansible_pkg_mgr == "dnf"
|
2015-01-21 01:43:47 +08:00
|
|
|
|
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-07-19 23:55:57 +08:00
|
|
|
- name: copy ceph admin key when using dmcrypt
|
|
|
|
set_fact:
|
|
|
|
copy_admin_key: true
|
|
|
|
when:
|
|
|
|
- dmcrypt_journal_colocation or dmcrypt_dedicated_journal
|
|
|
|
|
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 }}"
|
2016-02-25 19:10:45 +08:00
|
|
|
dest: "{{ item.name }}"
|
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:
|
2016-03-29 21:37:31 +08:00
|
|
|
- { name: "/var/lib/ceph/bootstrap-osd/{{ cluster }}.keyring", copy_key: true }
|
|
|
|
- { name: "/etc/ceph/{{ cluster }}.client.admin.keyring", copy_key: "{{ copy_admin_key }}" }
|
2015-11-20 22:09:34 +08:00
|
|
|
when:
|
2016-05-09 22:08:33 +08:00
|
|
|
- cephx
|
|
|
|
- item.copy_key|bool
|