On Thursday, February 1, 2018 at 5:06:58 PM UTC-5, Kai Stian Olstad wrote:
>
> On Thursday, 1 February 2018 22.49.06 CET Mike Cavedon wrote: 
> > I'm seeing what appears to be two different definitions of how limits 
> work. 
> > There is the first one here: 
> > 
> > http://docs.ansible.com/ansible/latest/playbooks_best_practices.html 
> > 
> > What about just the first 10, and then the next 10?: 
> > 
> > ansible-playbook -i production webservers.yml --limit boston[1:10] 
> > ansible-playbook -i production webservers.yml --limit boston[11:20] 
>
> This is not correct so it a documentation bug. 
> To make the statement correct it should be boston[0:9] and boston[10:19] 
>
>
> > Then there appears to be a different definition here: 
> > 
> > http://docs.ansible.com/ansible/latest/intro_patterns.html 
> > 
> > You can select a host or subset of hosts from a group by their position. 
> > For example, given the following group: 
> > 
> > [webservers] 
> > cobweb 
> > webbing 
> > weber 
> > 
> > You can refer to hosts within the group by adding a subscript to the 
> group 
> > name: 
> > 
> > webservers[0]       # == cobweb 
> > webservers[-1]      # == weber 
> > webservers[0:1]     # == webservers[0],webservers[1] 
> >                     # == cobweb,webbing 
> > webservers[1:]      # == webbing,weber 
>
> This is correct. 
>
>
> > Is it "--limit boston[1:2], or "--limit webservers[0:1]" for the first 
> 2? 
>
> "--limit webservers[0:1]" 
>
>
> -- 
> Kai Stian Olstad 
>

I entered a PR to correct the bug. thanks again

-- 
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/24c53487-bf04-4b53-873f-a94f44b24d4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to