The last mon creates the keys with a particular mode, while copying them
to the other mons (first and second) we must re-use the mode that was
set.
The same applies for the client node, the slurp preserves the initial
'item' so we can get the mode for the copy.
Signed-off-by: Sébastien Han <seb@redhat.com>
copy:
dest: "{{ item.source }}"
content: "{{ item.content | b64decode }}"
+ mode: "{{ item.item.mode }}"
+ owner: "{{ ceph_uid }}"
+ group: "{{ ceph_uid }}"
with_items:
- "{{ slurp_client_keys.results }}"
when:
copy:
src: "{{ fetch_directory }}/{{ fsid }}/etc/ceph/{{ cluster }}.{{ item.1.name }}.keyring"
dest: "/etc/ceph/{{ cluster }}.{{ item.1.name }}.keyring"
+ owner: "{{ ceph_uid }}"
+ group: "{{ ceph_uid }}"
+ mode: "{{ item.1.mode|default(omit) }}"
with_nested:
- "{{ groups[mon_group_name] }}"
- "{{ openstack_keys }}"