2016-05-11 00:29:27 +08:00
|
|
|
---
|
2017-12-12 18:25:26 +08:00
|
|
|
- name: check keys has been filled in users.key variables
|
|
|
|
fail:
|
|
|
|
msg: "you must generate and set keys properly in users.key variables"
|
|
|
|
with_items: "{{ keys }}"
|
|
|
|
when:
|
|
|
|
- user_config
|
|
|
|
- item.key == 'ADD-KEYRING-HERE=='
|
|
|
|
|
2017-09-14 04:13:53 +08:00
|
|
|
- name: set selinux permissions
|
|
|
|
shell: |
|
|
|
|
chcon -Rt svirt_sandbox_file_t {{ item }}
|
|
|
|
with_items:
|
|
|
|
- /etc/ceph
|
|
|
|
- /var/lib/ceph
|
|
|
|
changed_when: false
|
|
|
|
when:
|
2017-10-03 18:25:12 +08:00
|
|
|
- containerized_deployment
|
2017-12-12 21:55:02 +08:00
|
|
|
- ansible_os_family == 'RedHat'
|
2017-09-14 04:13:53 +08:00
|
|
|
- sestatus is defined
|
|
|
|
- sestatus.stdout != 'Disabled'
|
|
|
|
|
2016-05-11 00:29:27 +08:00
|
|
|
- name: copy ceph admin keyring
|
|
|
|
copy:
|
|
|
|
src: "{{ fetch_directory }}/{{ fsid }}/etc/ceph/{{ cluster }}.client.admin.keyring"
|
|
|
|
dest: "/etc/ceph/"
|
2017-01-20 17:14:35 +08:00
|
|
|
owner: "ceph"
|
|
|
|
group: "ceph"
|
|
|
|
mode: "0600"
|
2017-09-02 06:52:55 +08:00
|
|
|
when:
|
|
|
|
- cephx
|
|
|
|
- copy_admin_key
|