]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
mon: only put mon initial key in mon kv when cephx is enabled 1213/head
authorSébastien Han <seb@redhat.com>
Mon, 2 Jan 2017 10:16:03 +0000 (11:16 +0100)
committerSébastien Han <seb@redhat.com>
Mon, 2 Jan 2017 10:16:03 +0000 (11:16 +0100)
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 <seb@redhat.com>
roles/ceph-mon/tasks/ceph_keys.yml

index 4aeb229239538b6041914e9abfef60c62805dded..580b7d8cdbe2a98adc5d9495979391285447decc 100644 (file)
@@ -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