]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-mon: Fix bug #1242 1291/head
authorGuits <gabrioux@redhat.com>
Wed, 8 Feb 2017 09:45:09 +0000 (10:45 +0100)
committerGuits <gabrioux@redhat.com>
Wed, 8 Feb 2017 09:46:46 +0000 (10:46 +0100)
We shouldn't test directly the value of
`ceph_conf_overrides.global.osd_pool_default_pg_num` because this can
cause the playbook to fail if the key `global` is not present in
`ceph_conf_overrides`. Therefore we have to use the facts that have been
defined earlier.

Fix: #1242

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-mon/tasks/ceph_keys.yml

index f58c8b7fb74af6fd63f9cce689a2de7aa170f14e..3986661a375c16973d1c8faf4a15aa83fd55d381 100644 (file)
@@ -73,7 +73,7 @@
   when:
     - pool_default_pg_num is not defined
     - default_pool_default_pg_num.rc == 0
-    - ceph_conf_overrides.global.osd_pool_default_pg_num is not defined
+    - (osd_pool_default_pg_num_in_overrides is not defined or not osd_pool_default_pg_num_in_overrides)
 
 - set_fact:
     osd_pool_default_pg_num: "{{ ceph_conf_overrides.global.osd_pool_default_pg_num }}"