\r
fetch_directory: fetch/\r
\r
+# Even though MDS nodes should not have the admin key\r
+# at their disposal, some people might want to have it\r
+# distributed on MDS nodes. Setting 'copy_admin_key' to 'true'\r
+# will copy the admin key to the /etc/ceph/ directory\r
+copy_admin_key: false\r
+\r
cephx: true\r
\r
\r
- name: copy mds bootstrap key
copy:
- src: "{{ fetch_directory }}/{{ fsid }}/var/lib/ceph/bootstrap-mds/ceph.keyring"
- dest: /var/lib/ceph/bootstrap-mds/ceph.keyring
+ src: "{{ fetch_directory }}/{{ fsid }}{{ item.name }}"
+ dest: "{{ item }}"
owner: "{{ key_owner }}"
group: "{{ key_group }}"
mode: "{{ key_mode }}"
+ with_items:
+ - { name: /var/lib/ceph/bootstrap-mds/ceph.keyring, copy: true }
+ - { name: /etc/ceph/client.admin.keyring, "{{ copy_admin_key }}" }
+ when:
+ cephx and
+ item.copy is true
- name: create mds directory
file:
\r
fetch_directory: fetch/\r
\r
+# Even though OSD nodes should not have the admin key\r
+# at their disposal, some people might want to have it\r
+# distributed on OSD nodes. Setting 'copy_admin_key' to 'true'\r
+# will copy the admin key to the /etc/ceph/ directory\r
+copy_admin_key: false\r
+\r
####################\r
# OSD CRUSH LOCATION\r
####################\r
- name: copy osd bootstrap key
copy:
- src: "{{ fetch_directory }}/{{ fsid }}/var/lib/ceph/bootstrap-osd/ceph.keyring"
- dest: /var/lib/ceph/bootstrap-osd/ceph.keyring
+ src: "{{ fetch_directory }}/{{ fsid }}{{ item.name }}"
+ dest: "{{ item }}"
owner: "{{ key_owner }}"
group: "{{ key_group }}"
mode: "{{ key_mode }}"
+ with_items:
+ - { name: /var/lib/ceph/bootstrap-osd/ceph.keyring, copy: true }
+ - { name: /etc/ceph/client.admin.keyring, "{{ copy_admin_key }}" }
when:
- cephx
+ cephx and
+ item.copy is true
\r
fetch_directory: fetch/\r
\r
+# Even though RGW nodes should not have the admin key\r
+# at their disposal, some people might want to have it\r
+# distributed on RGW nodes. Setting 'copy_admin_key' to 'true'\r
+# will copy the admin key to the /etc/ceph/ directory\r
+copy_admin_key: false\r
+\r
## Ceph options\r
#\r
cephx: true\r
- name: copy rados gateway bootstrap key
copy:
- src: "{{ fetch_directory }}/{{ fsid }}/var/lib/ceph/bootstrap-rgw/ceph.keyring"
- dest: /var/lib/ceph/bootstrap-rgw/ceph.keyring
+ src: "{{ fetch_directory }}/{{ fsid }}{{ item.name }}"
+ dest: "{{ item }}"
owner: "{{ key_owner }}"
group: "{{ key_group }}"
mode: "{{ key_mode }}"
- when: cephx
+ with_items:
+ - { name: /var/lib/ceph/bootstrap-rgw/ceph.keyring, copy: true }
+ - { name: /etc/ceph/client.admin.keyring, "{{ copy_admin_key }}" }
+ when:
+ cephx and
+ item.copy is true
- name: create rados gateway keyring
command: ceph --cluster ceph --name client.bootstrap-rgw --keyring /var/lib/ceph/bootstrap-rgw/ceph.keyring auth get-or-create client.rgw.{{ ansible_hostname }} osd 'allow rwx' mon 'allow rw' -o /var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}/keyring