mirror of https://github.com/ceph/ceph-ansible.git
35 lines
795 B
YAML
35 lines
795 B
YAML
---
|
|
- name: install dependencies
|
|
package:
|
|
name: parted
|
|
state: present
|
|
when:
|
|
- ansible_os_family != 'ClearLinux'
|
|
|
|
- name: create bootstrap-osd and osd directories
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
owner: "ceph"
|
|
group: "ceph"
|
|
mode: "0755"
|
|
when:
|
|
cephx
|
|
with_items:
|
|
- /var/lib/ceph/bootstrap-osd/
|
|
- /var/lib/ceph/osd/
|
|
|
|
- name: copy osd bootstrap key
|
|
copy:
|
|
src: "{{ fetch_directory }}/{{ fsid }}{{ item.name }}"
|
|
dest: "{{ item.name }}"
|
|
owner: "ceph"
|
|
group: "ceph"
|
|
mode: "0600"
|
|
with_items:
|
|
- { name: "/var/lib/ceph/bootstrap-osd/{{ cluster }}.keyring", copy_key: true }
|
|
- { name: "/etc/ceph/{{ cluster }}.client.admin.keyring", copy_key: "{{ copy_admin_key }}" }
|
|
when:
|
|
- cephx
|
|
- item.copy_key|bool
|