]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
mon: Fixed crush_rule_config for containerised deployment.
authorGreg Charot <gcharot@redhat.com>
Fri, 2 Feb 2018 14:12:18 +0000 (15:12 +0100)
committerSébastien Han <seb@redhat.com>
Tue, 6 Feb 2018 15:04:32 +0000 (16:04 +0100)
Was called too early, container was not yet started so the commands failed.
Moved the section after include docker/main.yml

Signed-off-by: Greg Charot <gcharot@redhat.com>
(cherry picked from commit a6d1922a2e70c36036ff130dc6b6b942101379ba)

roles/ceph-mon/tasks/main.yml

index a29b4117cce31965a04e73bdd177fdc948913541..fab74a43d53c51dda948d8c033c1ead4c0cb61d1 100644 (file)
   # this avoids the bug mentioned here: https://github.com/ansible/ansible/issues/18206
   static: no
 
-- name: crush_rules.yml
-  include: crush_rules.yml
-  when:
-    - crush_rule_config
-
 - name: include secure_cluster.yml
   include: secure_cluster.yml
   when:
   include: docker/main.yml
   when: containerized_deployment
 
+- name: crush_rules.yml
+  include: crush_rules.yml
+  when:
+    - crush_rule_config
+    - inventory_hostname == groups.get(mon_group_name) | last
+
 - name: include set_osd_pool_default_pg_num.yml
   include: set_osd_pool_default_pg_num.yml