Hi Marco,

Not sure you can get the raw limit string, but there is this:

{{ ansible_play_hosts }}

If you are after list of target hosts for your play, after your limit has 
been resolved.

Thanks - Dan.

On Thursday, March 9, 2017 at 8:01:10 AM UTC, Marco Buttu wrote:
>
> Hi all, I would like to get the value of --limit. For instance, let's 
> have this command:
>
> $ ansible-playbook site.yml --limit foo
>
> I would like to read {{ limit }} from a task. Is there a solution or do I 
> have to do something like the following?
>
> $ ansible-playbook site.yml --limit foo -e "limit=foo"
>
> Thanks, Marco
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7198364d-1609-4da2-a19f-833aa2837b5f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to