Re: [ansible-devel] ansible tower messing up the order in which inventory hosts gets played

2019-11-21 Thread Alan Rominger
Tower saves the inventory in the database that it gets from the ansible-inventory command. To the best of my memory, ansible-inventory does an ordered JSON dump. We later take it back out of the database for the job run (at which point I really don't think the JSON dump is ordered), the ordering

Re: [ansible-devel] ansible tower messing up the order in which inventory hosts gets played

2019-11-21 Thread Nathan Brady
You may want to try specifying the ordered at the playbook level. You can find that option in the docs. https://docs.ansible.com/ansible/latest/user_guide/playbooks_intro.html Nathan Brady Red Hat Consulting e: nbr...@redhat.com | c: 1.317.344.9305 https://www.redhat.com On Thu, Nov 21, 2019

Re: [ansible-devel] ansible tower messing up the order in which inventory hosts gets played

2019-11-21 Thread Tom Davison
My first thought is how do you have your inventory in tower? Does it match the same exact layout as your inventory on the command line? As in server1 is the first entry, server2 the second, etc..? But generally speaking, since inventories may not always be perfectly matched, a better solution

[ansible-devel] ansible tower messing up the order in which inventory hosts gets played

2019-11-21 Thread madhan dhanikachalam
i have a code like this - template: src: ../files/kfhost.j2 dest: /app/bin/kafka/server.properties owner: kafka group: kafka mode: 0755 the jinga file has an entry like this broker.id={{ play_hosts.index(inventory_hostname)+1 }} when i have an

Re: [ansible-devel] Blacklisting hosts of a group in inventory file

2019-11-21 Thread Paul Belanger
On Wed, Nov 20, 2019 at 07:46:20PM -0800, chavali shruti wrote: > Suppose I want to blacklist a host of a group, in the inventory file, so as > not to allow the running of any other tasks on it. How can i do it? > I do want it in my hosts list and later, after i run a playbook on it.. i > want