From: Sébastien Han Date: Mon, 2 Jan 2017 10:16:03 +0000 (+0100) Subject: mon: only put mon initial key in mon kv when cephx is enabled X-Git-Tag: v2.2.0rc1~76^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=468afa2d5ba57ee212a50058ca70330371a84450;p=ceph-ansible.git mon: only put mon initial key in mon kv when cephx is enabled 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 --- 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