kolla-ansible/ansible/roles/manila/tasks/external_ceph.yml
zhulingjie 9cdd59ea98 Optimse the external ceph configure action
1. refer to the docs of external ceph for manila[0],
the ceph.conf will be found in ``/etc/kolla/config/manila/``,
so remove the unnecessary ``manila/manila-share`` folder
2. remove the ``manila/manila/ceph.client.manila.keyring``

[0]: https://github.com/openstack/kolla-ansible/blob/master/doc/source/reference/external-ceph-guide.rst

Change-Id: I93308b859b769a856c0519347277f01947f86f3d
2018-06-19 14:23:51 +00:00

43 lines
1.1 KiB
YAML

---
- name: Ensuring config directory exists
file:
path: "{{ node_config_directory }}/manila-share"
state: "directory"
when:
- inventory_hostname in groups['manila-share']
- name: Copying over ceph.conf for manila
template:
src: "{{ node_custom_config }}/manila/ceph.conf"
dest: "{{ node_config_directory }}/manila-share/ceph.conf"
mode: "0660"
become: true
when:
- inventory_hostname in groups['manila-share']
notify:
- Restart manila-share container
- name: Copy over Ceph keyring files for manila
copy:
src: "{{ item }}"
dest: "{{ node_config_directory }}/manila-share/"
mode: "0600"
become: true
with_fileglob:
- "{{ node_custom_config }}/manila/ceph.client*"
when:
- inventory_hostname in groups['manila-share']
notify:
- Restart manila-share container
- name: Ensuring config directory has correct owner and permission
become: true
file:
path: "{{ node_config_directory }}/{{ item }}"
recurse: yes
owner: "{{ config_owner_user }}"
group: "{{ config_owner_group }}"
when: inventory_hostname in groups[item]
with_items:
- "manila-share"