Hi, there is similar issue on github:
https://github.com/ansible/ansible/issues/4620

I already say about that, seems that ansible developers don't see any 
problem, and don't want to reopen issue.

So the only way how to do this use simple shell scripting, like for your 
command:

ansible-playbook site.yml --limit=`echo host{010..027} | tr \  ,`

- kvaps

On Wednesday, January 3, 2018 at 6:04:23 PM UTC+1, Frank Thommen wrote:
>
> Hi, 
>
> I assumed, that host ranges could be used with ansible-playbook's 
> --limit as they can be used in the inventory itself.  However this 
> doesn't seem to be possible: 
>
>
> $ ansible-playbook site.yml --limit='host[010:027]' 
>
>   [WARNING]: Could not match supplied host pattern, ignoring: host 
>
> ERROR! Specified --limit does not match any hosts 
> $ 
>
> All hosts host010 - host027 are listed in the inventory. 
>
> The same happens with double quotes and witout quotes around the limit 
> pattern. 
>
> How can I use host ranges witn --limit? 
>
> Cheers 
> frank 
>
>
>

-- 
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/a4e631ef-7199-42d2-8ac5-d58223f69695%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to