zuul/zuul/ansible
Jamie Lennox eed3253bcb 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
2017-03-17 08:27:16 +11:00
..
action Merge "Fix keyerror with synchronize" into feature/zuulv3 2017-02-24 19:55:28 +00:00
callback Handle the 'all' group in callback. 2017-03-17 08:27:16 +11:00
library It's _still_ FILE not PATH 2017-02-23 15:11:58 -05:00
__init__.py Ansible launcher: add zuul_runner module 2016-05-12 11:37:19 -07:00
paths.py Fully expand path when testing it 2017-02-23 11:56:47 -05:00