How to get the --limit command line option

Hi all, I would like to read the --limit command line option. For instance, let’s have the following:

$ ansible-playbook site.yml --limit foo

I would like the tasks to read {{ limit }}. Is it possibile or do I have to duplicate thinks like in the following?

$ ansible-playbook site.yml --limit foo --extra-vars “limit=foo”

Thanks, Marco

That is info is not available direclty in play, but you could check
ansible_play_hosts vs the hosts pattern to see what the difference is.

If you supply multiple options for --limit, only the last one is heeded.