2015-01-21 01:43:47 +08:00
|
|
|
---
|
2017-01-27 18:10:21 +08:00
|
|
|
- name: create bootstrap-osd and osd directories
|
2015-11-17 23:10:02 +08:00
|
|
|
file:
|
2017-01-27 18:10:21 +08:00
|
|
|
path: "{{ item }}"
|
2015-11-17 23:10:02 +08:00
|
|
|
state: directory
|
2018-04-11 23:15:29 +08:00
|
|
|
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
|
|
|
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
2017-01-20 17:14:35 +08:00
|
|
|
mode: "0755"
|
2019-05-22 16:02:42 +08:00
|
|
|
when: cephx | bool
|
2017-01-27 18:10:21 +08:00
|
|
|
with_items:
|
|
|
|
- /var/lib/ceph/bootstrap-osd/
|
|
|
|
- /var/lib/ceph/osd/
|
2015-11-17 23:10:02 +08:00
|
|
|
|
2018-04-11 23:15:29 +08:00
|
|
|
- name: copy ceph key(s) if needed
|
2015-10-19 09:24:47 +08:00
|
|
|
copy:
|
2018-04-11 23:15:29 +08:00
|
|
|
src: "{{ fetch_directory }}/{{ fsid }}/{{ item.name }}"
|
2016-02-25 19:10:45 +08:00
|
|
|
dest: "{{ item.name }}"
|
2018-04-11 23:15:29 +08:00
|
|
|
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
|
|
|
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}"
|
2018-06-25 21:12:56 +08:00
|
|
|
mode: "{{ ceph_keyring_permissions }}"
|
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:
|
2019-05-22 16:02:42 +08:00
|
|
|
- cephx | bool
|
|
|
|
- item.copy_key | bool
|