http://docs.ansible.com/ansible/latest/playbooks_loops.html#looping-over-a-list-with-an-index
On 7 September 2017 at 19:14, Giovanni Gaglione
wrote:
> I basically need the index of the current hostname, but I can't find a way.
> {{ groups['browsers'].index(inventory_hostname) }} will return alway
I've solved it this way
- https://github.com/ansible/ansible/issues/12086#issuecomment-327927275
On Thursday, September 7, 2017 at 8:14:35 PM UTC+2, Giovanni Gaglione wrote:
>
> I basically need the index of the current hostname, but I can't find a
> way.
> {{ groups['browsers'].index(inventory
I basically need the index of the current hostname, but I can't find a way.
{{ groups['browsers'].index(inventory_hostname) }} will return always the
same index (because the hostname is always the same).
I couldn't find any other way. Do you know if the API offers something more
appropriate? St
Hi Jesse,
Could you make an example of this solution?
My scenario is like the following:
[myhost]
192.168.1.1
192.168.1.1
192.168.1.1
192.168.1.1
192.168.1.1
192.168.1.1
192.168.1.1
But then, when ansible iterates over these host, I would like to have a
unique name of the host (example `192.16
So, this is an old post, so I have an update for you.
You can already get a fair measure of this if you are an AWX user, here to
launch a few Job Templates by ID:
awx-cli joblaunch -t 0 && awx-cli joblaunch -t 1
This also gives you central status logging and access control -- delegation
around w
Something native to Ansible would be great. I can see this being generally
useful and a feature I'm certainly interested in.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, se