From f5c6ea8cf94f31d3e02b2649d1765556afa39c10 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Fri, 16 Feb 2018 09:04:23 +0100 Subject: [PATCH] client: use `ceph_uid` fact to set uid/gid on admin key MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 (cherry picked from commit 6d35bc9bde6502ffa81f3c77679cf3f418cd62ca) Signed-off-by: Sébastien Han --- roles/ceph-client/tasks/pre_requisite.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/roles/ceph-client/tasks/pre_requisite.yml b/roles/ceph-client/tasks/pre_requisite.yml index dc9717a44..fae5e8ce0 100644 --- a/roles/ceph-client/tasks/pre_requisite.yml +++ b/roles/ceph-client/tasks/pre_requisite.yml @@ -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/" @@ -28,5 +28,18 @@ 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 -- 2.39.5