kolla-ansible/ansible/roles/cinder/tasks/external_ceph.yml
Kuo-tung Kao 20595eb838 copy cinder_backup keyring from cinder_backup
keyring should copy from cinder_backup folder when using external ceph

Change-Id: Ic7c5532355eed1fa1362f84f5c2691f698d5792a
Closes-Bug: 1703733
2017-07-27 16:36:13 +08:00

53 lines
1.6 KiB
YAML

---
- name: Ensuring config directory exists
vars:
services_need_directory:
- "cinder-volume"
- "cinder-backup"
file:
path: "{{ node_config_directory }}/{{ item.key }}"
state: "directory"
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
- item.key in services_need_directory
with_dict: "{{ cinder_services }}"
- name: Copying over ceph.conf for Cinder
vars:
services_need_config:
- "cinder-volume"
- "cinder-backup"
merge_configs:
sources:
- "{{ node_custom_config }}/cinder/ceph.conf"
- "{{ node_custom_config }}/cinder/{{ item.key }}/ceph.conf"
dest: "{{ node_config_directory }}/{{ item.key }}/ceph.conf"
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
- item.key in services_need_config
with_dict: "{{ cinder_services }}"
- name: Copy over Ceph keyring files for cinder-volume
copy:
src: "{{ item }}"
dest: "{{ node_config_directory }}/cinder-volume/"
with_fileglob:
- "{{ node_custom_config }}/cinder/cinder-volume/ceph.client*"
when:
- external_ceph_cephx_enabled | bool
- inventory_hostname in groups['cinder-volume']
- cinder_services['cinder-volume'].enabled | bool
- name: Copy over Ceph keyring files for cinder-backup
copy:
src: "{{ item }}"
dest: "{{ node_config_directory }}/cinder-backup/"
with_fileglob:
- "{{ node_custom_config }}/cinder/cinder-backup/ceph.client*"
when:
- external_ceph_cephx_enabled | bool
- inventory_hostname in groups['cinder-backup']
- cinder_services['cinder-backup'].enabled | bool