- hosts: webservers:!webservers[0] Should do the trick. This means include all the webservers except the first one.
- James On Wednesday, November 19, 2014 4:14:35 AM UTC-5, Bohdan Sydor wrote: > > On Wed, Nov 19, 2014 at 9:28 AM, t goto <[email protected] <javascript:>> > wrote: > > > Hello, > > > I have several servers in a group in inventory file. > > [webservers] > > web1 > > web2 > > web3 > > web4 > > . > > Please, try this way: > > > - name: do something all hosts but first in a webservers group > > hosts: webservers[1:last] > > tasks: > > hosts: webservers:!web1 > > -- > Regards, > Bohdan > -- 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/f70fb7b7-1927-478b-a867-d13354fc7a88%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
