Handle the 'all' group in callback.

When the callback is called and the play is running against 'all' hosts
but only named hosts are provided we end up with a KeyError on host_vars
and the job fails.

Typically the inventory is responsible for parsing this string and
associating with the internally maintained list of all hosts, however at
this point in the callback structure we have only got access to the raw
play data and this list has not been parsed.

I can't see a way to get access to the inventory here to parse these
strings into host objects, but as a workaround for now we can assume
that 'all' hosts are the same as all the hosts that have host_vars
associated.

The same problem will likely happen later if we allow ansible groups to
be inputted into the inventory - however as that's not currently
possible in zuul the special case is probably fine for now.

Change-Id: I9274a2098348b736198e5fea344f078ee0404b41
1 file changed