]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
shrink-mds: use fact from delegated node
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 8 Jan 2020 14:02:24 +0000 (15:02 +0100)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Wed, 8 Jan 2020 16:18:45 +0000 (11:18 -0500)
The command is delegated on the first monitor so we must use the fact
`container_binary` from this node.

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

infrastructure-playbooks/shrink-mds.yml

index e862e6597b0966738b1d2712fcb65595bfb33617..f5503b328de9144bd3d1a54e4cd5f8f98a849405 100644 (file)
   tasks:
     - debug:
         msg: gather facts on all Ceph hosts for following reference
+    - import_role:
+        name: ceph-defaults
+    - import_role:
+        name: ceph-facts
 
 - name: perform checks, remove mds and print cluster health
   hosts: localhost
            or use `-e ireallymeanit=yes` on the command line when
            invoking the playbook"
 
-    - import_role:
-        name: ceph-facts
-
     - name: set_fact container_exec_cmd for mon0
       set_fact:
-        container_exec_cmd: "{{ container_binary }} exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }}"
+        container_exec_cmd: "{{ hostvars[groups[mon_group_name][0]]['container_binary'] }} exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }}"
       when: containerized_deployment | bool
 
     - name: exit playbook, if can not connect to the cluster