]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
purge: gather monitors facts in OSD purge
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 5 Dec 2018 08:06:53 +0000 (09:06 +0100)
committerSébastien Han <seb@redhat.com>
Mon, 7 Jan 2019 08:14:10 +0000 (09:14 +0100)
the OSD part of the purge delegates commands on monitor node, we need to
gather monitors facts to know the `ansible_hostname` fact that is used
in the `docker_exec_cmd` fact.

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

infrastructure-playbooks/purge-docker-cluster.yml

index 4786d32a8142e5a62a38df65217b42fb5385c15d..4a2f5d98c8836192d0639e7631cb082bfe94dace 100644 (file)
 - name: purge ceph osd cluster
 
   hosts:
-    - "{{ osd_group_name|default('osds') }}"
+    - "{{ osd_group_name | default('osds') }}"
 
   gather_facts: true
   become: true
 
+  pre_tasks:
+  - name: gather monitors facts
+    setup:
+    delegate_to: "{{ item }}"
+    delegate_facts: True
+    with_items: "{{ groups[mon_group_name] | default('mons') }}"
+
   tasks:
 
   - import_role: