]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
mon: remove useless delegate_to
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 9 Apr 2019 15:38:01 +0000 (17:38 +0200)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Wed, 10 Apr 2019 09:52:29 +0000 (09:52 +0000)
Let's use a condition to run this task only on the first mon.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 631e5d31446e514a00428c345d0db9d4c9c9cdab)

roles/ceph-mon/tasks/main.yml

index ac158a08412dfcf27ade62fa12769b0ea90b5a82..893f9ff5771ed6c6a37da070500e37797b8435eb 100644 (file)
 
 - name: include secure_cluster.yml
   include_tasks: secure_cluster.yml
-  delegate_to: "{{ groups[mon_group_name][0] }}"
-  run_once: true
   when:
     - secure_cluster
+    - inventory_hostname == groups[mon_group_name] | first
 
 - name: crush_rules.yml
   include_tasks: crush_rules.yml
   when:
-    - crush_rule_config
\ No newline at end of file
+    - crush_rule_config