kolla/ansible/roles/ceph/tasks/distribute_keyrings.yml
SamYaple 33f3e1d8ca Update ceph-mon keyrings
Since the fetch script fetched _all_ keyrings from the ceph-mon
container, the ceph-mon container must contain all keyrings. This
setup works AIO but was broken on multinode because the ceph-mon
container did not have the radosgw keyring. This issue affects every
multinode install regardless of using the radosgw or not.

TrivialFix

Change-Id: Ie416de1a5275862da6d77ef0dd174e85e499fc0f
2016-01-28 17:47:30 +00:00

47 lines
1.5 KiB
YAML

---
- name: Fetching Ceph keyrings
command: docker exec ceph_mon fetch_ceph_keys.py
register: ceph_files_json
changed_when: "{{ (ceph_files_json.stdout | from_json).changed }}"
failed_when: "{{ (ceph_files_json.stdout | from_json).failed }}"
delegate_to: "{{ delegate_host }}"
run_once: True
- name: Reading json from variable
set_fact:
ceph_files: "{{ (ceph_files_json.stdout | from_json) }}"
- name: Pushing Ceph keyring for OSDs
bslurp:
src: "{{ item.content }}"
dest: "{{ node_config_directory }}/ceph-osd/{{ item.filename }}"
mode: 0600
sha1: "{{ item.sha1 }}"
with_items:
- "{{ ceph_files['ceph.client.admin.keyring'] }}"
when: inventory_hostname in groups['ceph-osd']
- name: Pushing Ceph keyrings for Mons
bslurp:
src: "{{ item.content }}"
dest: "{{ node_config_directory }}/ceph-mon/{{ item.filename }}"
mode: 0600
sha1: "{{ item.sha1 }}"
with_items:
- "{{ ceph_files['ceph.client.admin.keyring'] }}"
- "{{ ceph_files['ceph.client.mon.keyring'] }}"
- "{{ ceph_files['ceph.client.radosgw.keyring'] }}"
- "{{ ceph_files['ceph.monmap'] }}"
when: inventory_hostname in groups['ceph-mon']
- name: Pushing Ceph keyrings for RGWs
bslurp:
src: "{{ item.content }}"
dest: "{{ node_config_directory }}/ceph-rgw/{{ item.filename }}"
mode: 0600
sha1: "{{ item.sha1 }}"
with_items:
- "{{ ceph_files['ceph.client.admin.keyring'] }}"
- "{{ ceph_files['ceph.client.radosgw.keyring'] }}"
when: inventory_hostname in groups['ceph-rgw']