]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
client: do not rely on copy_admin_key to import keys
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 11 Jul 2018 14:03:10 +0000 (16:03 +0200)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Fri, 13 Jul 2018 06:52:00 +0000 (06:52 +0000)
Relying on `copy_admin_key` to import created keys on client nodes makes
us obliged to copy admin key on those nodes which is not something we might
want.
We should use the fact `condition_copy_admin_key` which will be set to
`True` when the delegated node is a mon which means we can import keys
without taking care of admin keyring.

Fixes: #2867
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-client/tasks/create_users_keys.yml

index 91b1d8afd5c487bd6a407176d4940fe91865d1c7..ca7e49364beb383491eb2e545d3a40e19476faf3 100644 (file)
@@ -50,7 +50,7 @@
     containerized: "{{ docker_exec_cmd | default('') }}"
     cluster: "{{ cluster }}"
     dest: "{{ ceph_conf_key_directory }}"
-    import_key: "{{ copy_admin_key }}"
+    import_key: "{{ condition_copy_admin_key }}"
     mode: "{{ item.mode|default(omit) }}"
   with_items: "{{ keys }}"
   delegate_to: "{{ delegated_node }}"