]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
update: use right node when creating active mds group v4.0.4
authorGuillaume Abrioux <gabrioux@redhat.com>
Thu, 24 Oct 2019 07:41:06 +0000 (09:41 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Fri, 25 Oct 2019 07:42:52 +0000 (09:42 +0200)
This must be consistent with what is used in `name` parameter.

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

infrastructure-playbooks/rolling_update.yml

index 82388cd10a67d61c16452b328838166402a35366..01a873f58a76a89c039d7aeeeb089424941a41b8 100644 (file)
           add_host:
             name: "{{ mds_active_name[0] if mds_active_name is defined else groups.get(mds_group_name)[0] }}"
             groups: active_mdss
-            ansible_host: "{{ hostvars[mds_active_name]['ansible_host'] | default(omit) }}"
-            ansible_port: "{{ hostvars[mds_active_name]['ansible_port'] | default(omit) }}"
+            ansible_host: "{{ hostvars[mds_active_name[0] if mds_active_name is defined else groups.get(mds_group_name)[0]]['ansible_host'] | default(omit) }}"
+            ansible_port: "{{ hostvars[mds_active_name[0] if mds_active_name is defined else groups.get(mds_group_name)[0]]['ansible_port'] | default(omit) }}"
 
 
 - name: upgrade active mds