]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
allow multiple mon containers to reach quorum
authorHuamin Chen <hchen@redhat.com>
Mon, 8 Feb 2016 17:23:37 +0000 (17:23 +0000)
committerSébastien Han <seb@redhat.com>
Thu, 24 Mar 2016 15:16:27 +0000 (16:16 +0100)
Signed-off-by: Huamin Chen <hchen@redhat.com>
roles/ceph-mon/tasks/ceph_keys.yml
roles/ceph-mon/tasks/docker/main.yml

index f5eba729b3494876be5c8ea78772da2482ac4e9b..00c7168956c64416507f94b2e2f50f2dfd3407c8 100644 (file)
@@ -15,6 +15,8 @@
     not mon_containerized_deployment and
     groups[restapi_group_name] is defined
 
+- debug: msg="host {{ inventory_hostname }} last {{ groups.mons|last }}"
+
 - name: create ceph rest api keyring when mon is containerized
   command: docker exec {{ ansible_hostname }} ceph auth get-or-create client.restapi osd 'allow *' mon 'allow *' -o /etc/ceph/ceph.client.restapi.keyring
   args:
@@ -23,7 +25,9 @@
   when:
     cephx and
     mon_containerized_deployment and
-    groups[restapi_group_name] is defined
+    groups[restapi_group_name] is defined and
+    inventory_hostname == groups.mons|last
+
 
 - include: openstack_config.yml
   when: openstack_config
index e1965301fe824fe55721ef14aa660a49b93de032..c5d82070f023709410945bbca9fc24f9e2f3109a 100644 (file)
@@ -25,4 +25,4 @@
   when: inventory_hostname == groups.mons[0]
 - include: fetch_configs.yml
 - include: start_docker_monitor.yml
-- include: ../ceph_keys.yml
+- include: ../ceph_keys.yml
\ No newline at end of file