Can't check if it works, but Python's way to say "all but first" is 
`some_list[1:]`. So I'd guess you want `with_items: groups.webservers[1:]`

t goto <[email protected]> napisał:
>Hello, Ansible experts.
>I'm stuck with this and I need help.
>
>
>I have several servers in a group in inventory file.
>[webservers]
>web1
>web2
>web3
>web4
> .
> .
>
>
>And I want to do some tasks to all hosts except first one in webservers
>
>group.
>Unworkable pattern follows. :(
>
>- name: do something all hosts but first in a webservers group
>  hosts: webservers[1:last]
>  tasks:
>   (snip)
>
>
>Since I can't fix how many hosts webservers group has, I want to make
>it 
>rather dynamic.
>Any suggestion?
>
>-- 
>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, send
>an email to [email protected].
>To post to this group, send email to [email protected].
>To view this discussion on the web visit
>https://groups.google.com/d/msgid/ansible-project/0503bf57-3ad5-43cc-babd-ad94b48bd9c7%40googlegroups.com.
>For more options, visit https://groups.google.com/d/optout.

-- 
Wysłane za pomocą K-9 Mail.

-- 
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, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9e392d67-95ff-4e99-b49a-b236cdc8029a%40email.android.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to