From 468afa2d5ba57ee212a50058ca70330371a84450 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Han?= Date: Mon, 2 Jan 2017 11:16:03 +0100 Subject: [PATCH] mon: only put mon initial key in mon kv when cephx is enabled MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Task put initial mon keyring in mon kv store from ceph-mon/tasks/ceph_keys.yml is failing when cephx is disabled. The root cause is that variable monitor_keyring is not populated by any task from deploy_monitors.yml. Fixes: #1211 Signed-off-by: Sébastien Han --- roles/ceph-mon/tasks/ceph_keys.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/ceph-mon/tasks/ceph_keys.yml b/roles/ceph-mon/tasks/ceph_keys.yml index 4aeb22923..580b7d8cd 100644 --- a/roles/ceph-mon/tasks/ceph_keys.yml +++ b/roles/ceph-mon/tasks/ceph_keys.yml @@ -19,7 +19,9 @@ changed_when: false always_run: true run_once: true - when: is_initial_mon_keyring_in_kv.rc != 0 + when: + - is_initial_mon_keyring_in_kv.rc != 0 + - cephx - name: create ceph rest api keyring when mon is not containerized command: ceph --cluster {{ cluster }} auth get-or-create client.restapi osd 'allow *' mon 'allow *' -o /etc/ceph/{{ cluster }}.client.restapi.keyring -- 2.39.5