# ansible 2.9 yaml inventory and group ordering

**URL:** <https://forum.ansible.com/t/ansible-2-9-yaml-inventory-and-group-ordering/34605>\
**Category:** Ansible Project\
**Created:** [February 10, 2021, 5:01pm UTC](https://forum.ansible.com/t/ansible-2-9-yaml-inventory-and-group-ordering/34605 "2021-02-10T17:01:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Julien\_Tognazzi](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@Julien\_Tognazzi](https://forum.ansible.com/u/Julien_Tognazzi)\
**Post date:** [February 10, 2021, 5:01pm UTC](https://forum.ansible.com/t/ansible-2-9-yaml-inventory-and-group-ordering/34605/1 "2021-02-10T17:01:42Z")

</div>

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](https://github.com/ansible/ansible/pull/58000)  
but it does not seem to be part of ansible 2.9

Does anybody knows why ?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [February 10, 2021, 5:50pm UTC](https://forum.ansible.com/t/ansible-2-9-yaml-inventory-and-group-ordering/34605/2 "2021-02-10T17:50:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Julien\_Tognazzi](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@Julien\_Tognazzi](https://forum.ansible.com/u/Julien_Tognazzi)\
**Post date:** [February 10, 2021, 6:01pm UTC](https://forum.ansible.com/t/ansible-2-9-yaml-inventory-and-group-ordering/34605/3 "2021-02-10T18:01:03Z")

</div>

So no backport to 2.9 ?

---

<div class="post-metadata">

**Author:** ![Julien\_Tognazzi](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@Julien\_Tognazzi](https://forum.ansible.com/u/Julien_Tognazzi)\
**Post date:** [February 10, 2021, 6:03pm UTC](https://forum.ansible.com/t/ansible-2-9-yaml-inventory-and-group-ordering/34605/4 "2021-02-10T18:03:41Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [February 10, 2021, 9:54pm UTC](https://forum.ansible.com/t/ansible-2-9-yaml-inventory-and-group-ordering/34605/5 "2021-02-10T21:54:52Z")

</div>

not at this point, security patches only for 2.9
