Properly distribute extra ceph client keys

When adding extra ceph clusters, client keys are not currently
distributed to hypervisors; This patch ensures that
the keys are properly distributed and cleaned up by ansible.

Change-Id: I3eb8fa201f4601565e88e0e68af68e9dfdadc88f
This commit is contained in:
Michael Gugino 2016-12-09 16:13:16 -05:00
parent 4a096dfab5
commit b818c7f832
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,6 @@
---
fixes:
- Properly distrubute client keys to nova hypervisors
when extra ceph clusters are being deployed.
- Properly remove temporary files used to transfer
ceph client keys from the deploy host and hypervisors.

View File

@ -34,6 +34,18 @@
- ceph-config-create-config
- ceph-config-extra
- name: Distribute extra key files
copy:
src: "/tmp/{{ item.mon_host }}{{ item.client_name }}.key.tmp"
dest: "/tmp/{{ item.mon_host }}{{ item.client_name }}.key.tmp"
with_items: "{{ ceph_extra_confs }}"
when:
- item.mon_host is defined
- item.client_name is defined
tags:
- ceph-config-create-config
- ceph-config-extra
- name: Remove temp extra key files
file:
path: "/etc/ceph/ceph.client.{{ item.client_name }}.key.tmp"
@ -166,3 +178,12 @@
with_items: "{{ ceph_extra_confs }}"
tags:
- always
- name: Remove libvirt key file localhost
file:
path: "/tmp/{{ item.mon_host }}{{ item.client_name }}.key.tmp"
state: "absent"
delegate_to: localhost
with_items: "{{ ceph_extra_confs }}"
tags:
- always