]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
mon/client: honor key mode when copying it to other nodes v3.1.0beta8
authorSébastien Han <seb@redhat.com>
Mon, 23 Apr 2018 08:02:16 +0000 (10:02 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 23 Apr 2018 16:34:58 +0000 (18:34 +0200)
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>
roles/ceph-client/tasks/create_users_keys.yml
roles/ceph-mon/tasks/openstack_config.yml

index eef8701347ba95475413080efa45f3b4c2158424..60e31138bff01919cae863850f5ff42c18d60a94 100644 (file)
@@ -92,6 +92,9 @@
   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:
index 78cf13ff9a6de79ea3c6d767eefe07fbb7be6b4b..cfabd996c42c69bb7e57dd154cdb207c0d9939a7 100644 (file)
@@ -44,6 +44,9 @@
   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 }}"