]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
update: use right node when creating active mds group
authorGuillaume Abrioux <gabrioux@redhat.com>
Thu, 24 Oct 2019 07:41:06 +0000 (09:41 +0200)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Thu, 24 Oct 2019 19:15:51 +0000 (15:15 -0400)
This must be consistent with what is used in `name` parameter.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
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