From c69c8c9ac135e5deebae04c5e772055c03723c9d Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Han?= Date: Fri, 8 Feb 2019 16:05:20 +0100 Subject: [PATCH] mon: do not hardcode ceph uid MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 167 is the ceph uid for Red Hat based system, thus trying to deploy a monitor on Debian fail since the ceph user id on that system is 64045. This commit uses the ceph_uid variable which contains the right uid based on system/container detection. Closes: https://github.com/ceph/ceph-ansible/issues/3589 Signed-off-by: Sébastien Han --- roles/ceph-mon/tasks/deploy_monitors.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/ceph-mon/tasks/deploy_monitors.yml b/roles/ceph-mon/tasks/deploy_monitors.yml index d89c5e89f..6cb79f6ce 100644 --- a/roles/ceph-mon/tasks/deploy_monitors.yml +++ b/roles/ceph-mon/tasks/deploy_monitors.yml @@ -97,8 +97,8 @@ command: > {{ ceph_mon_cmd }} --cluster {{ cluster }} - --setuser 167 - --setgroup 167 + --setuser "{{ ceph_uid if containerized_deployment else 'ceph' }}" + --setgroup "{{ ceph_uid if containerized_deployment else 'ceph' }}" --mkfs -i {{ monitor_name }} --fsid {{ fsid }} @@ -112,8 +112,8 @@ command: > {{ ceph_mon_cmd }} --cluster {{ cluster }} - --setuser ceph - --setgroup ceph + --setuser "{{ ceph_uid if containerized_deployment else 'ceph' }}" + --setgroup "{{ ceph_uid if containerized_deployment else 'ceph' }}" --mkfs -i {{ monitor_name }} --fsid {{ fsid }} -- 2.39.5