kolla-ansible/ansible/roles/cinder/tasks/external_ceph.yml
shaofeng_cheng 3a67e5727b Add copy ceph keyring files conditions in cinder
If used external ceph for cinder,the ceph storage not enable cephx.
So ceph keyring file not does not exist.
Task throw warning of copy over ceph keyring files.

Change-Id: Ibb3cd536c982ad9dede3c2a0ecfc02cdf6e4c1b9
Closes-Bug: #1684461
2017-04-21 09:58:50 +08:00

39 lines
1.1 KiB
YAML

---
- name: Ensuring config directory exists
file:
path: "{{ node_config_directory }}/cinder-{{ item }}"
state: "directory"
when: inventory_hostname in groups['cinder-volume'] or
inventory_hostname in groups['cinder-backup']
with_items:
- volume
- backup
- name: Copying over ceph.conf for Cinder
merge_configs:
vars:
service_name: "{{ item }}"
sources:
- "{{ node_custom_config }}/cinder/ceph.conf"
- "{{ node_custom_config }}/cinder/{{ item }}/ceph.conf"
dest: "{{ node_config_directory }}/{{ item }}/ceph.conf"
with_items:
- "cinder-backup"
- "cinder-volume"
- 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
- 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-volume/ceph.client*"
when: external_ceph_cephx_enabled | bool