ansible 2.9 yaml inventory and group ordering

Dear list,

I recently changed from a ini inventory to a yaml one.

And I was hit by a change in the groups ordering on Centos-7.

ansible 2.9.17
config file = /opt/devtools-work/bamboo/xml-data/build-dir/1179649/135102466-135168007/ansible.cfg
configured module search path = [u’/opt/devtools-work/bamboo/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /bin/ansible
python version = 2.7.5 (default, Apr 2 2020, 13:16:51) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]

After looking around I found the following PR https://github.com/ansible/ansible/pull/58000
but it does not seem to be part of ansible 2.9

Does anybody knows why ?

It was added to 2.10, but you can get 'similar' results by using a python >=3.8

So no backport to 2.9 ?

I checked, on centos-7, latest python3 is 3.6.8-18.el7

So going to >= 3.8 is not an easy task.

not at this point, security patches only for 2.9