Getting list of all hosts after using '--limit' switch or 'serial' command

Hi,

is there a way to get a list of all the hosts that the playbook is being executed on?

I know there is a way to get all the hosts in a particular group by using ‘groups[‘my_group’]’ variable. But this list does not change when ‘–limit’ or ‘serial’ is used.

Martynas

Sorry about the double post. I posted the first post and it was not approved after half a day. So I thought I pressed cancel instead of POST and posted the same question again.