]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
client: use `ceph_uid` fact to set uid/gid on admin key
authorGuillaume Abrioux <gabrioux@redhat.com>
Fri, 16 Feb 2018 08:04:23 +0000 (09:04 +0100)
committerSébastien Han <seb@redhat.com>
Mon, 26 Feb 2018 14:52:05 +0000 (15:52 +0100)
That task is failing on containerized deployment because `ceph:ceph`
doesn't exist.
The idea here is to use the `{{ ceph_uid }}` to set the ownerships for
the admin keyring when containerized_deployment.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1540578
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-client/tasks/pre_requisite.yml

index dc9717a44f08bb8a183a355e505c36231f0f2758..fae5e8ce0d9dad43f993b00249fc18248a1e8e00 100644 (file)
@@ -20,7 +20,7 @@
     - sestatus is defined
     - sestatus.stdout != 'Disabled'
 
-- name: copy ceph admin keyring
+- name: copy ceph admin keyring when non containerized deployment
   copy:
     src: "{{ fetch_directory }}/{{ fsid }}/etc/ceph/{{ cluster }}.client.admin.keyring"
     dest: "/etc/ceph/"
     group: "ceph"
     mode: "0600"
   when:
+    - not containerized_deployment
+    - cephx
+    - copy_admin_key
+
+- name: copy ceph admin keyring when containerized deployment
+  copy:
+    src: "{{ fetch_directory }}/{{ fsid }}/etc/ceph/{{ cluster }}.client.admin.keyring"
+    dest: "/etc/ceph/"
+    owner: "{{ ceph_uid }}"
+    group: "{{ ceph_uid }}"
+    mode: "0600"
+  when:
+    - containerized_deployment
     - cephx
     - copy_admin_key