---
- name: Copying over ceph.conf for Zun
  copy:
    src: "{{ node_custom_config }}/zun/zun-compute/{{ ceph_cluster }}.conf"
    dest: "{{ node_config_directory }}/zun-compute/"
    mode: "0660"
  become: true

- name: Copy over Ceph keyring files for zun-compute
  copy:
    src: "{{ node_custom_config }}/zun/zun-compute/{{ ceph_cluster }}.client.{{ ceph_cinder_user }}.keyring"
    dest: "{{ node_config_directory }}/zun-compute/"
    mode: "0660"
  become: true
  when: external_ceph_cephx_enabled | bool

- name: Ensuring config directory has correct owner and permission
  become: true
  file:
    path: "{{ node_config_directory }}/zun-compute"
    recurse: yes
    owner: "{{ config_owner_user }}"
    group: "{{ config_owner_group }}"
