Reversed sorted inventory

I have an issue when I want to reboot hosts in a sequence. I am using serial: 1 to make sure the playbook runs on 1 host at a time which works perfectly, but Ansible runs the inventory in reversed order.
This was tested with Ansible version 1.6.6 and 1.7.1.

See: http://pastebin.com/Hc18K7wX for my test run.

Is this expected behaviour? For now I’ll reverse the inventory list to workaround the issue.

No, it’s definitely not expected, gathering facts happens in the right order, but the hosts go backwards.

This is a bug for sure, and I’m filing it as a high priority item.

Thanks very much for the report.

You can follow this ticket at - https://github.com/ansible/ansible/issues/8646 - thanks once again!

Thanks Michael, I’ll keep an eye on the report.

Has this issue been resolved, I used an apt-get installation method in Ubuntu 12.04 ,Precise. Currently I have ansible 1.7 installed.

Yes, this issue has been resolved on the development branch for 1.8.

Should a 1.7.2 occur in the future (not currently in plan, but this will likely change), it will be included there as well.

The ticket is here: https://github.com/ansible/ansible/issues/8646

A bit too late for me, working on a workaround :slight_smile: