Support item label in v2_playbook_on_include (#42478)

* Support item label in v2_playbook_on_include. Fixes #42301

* test fixes
This commit is contained in:
Matt Martz 2018-07-09 10:27:00 -05:00 committed by Brian Coca
parent 9bd7bd5d46
commit 50905b980d
3 changed files with 8 additions and 2 deletions

View file

@ -269,6 +269,8 @@ class CallbackModule(CallbackBase):
def v2_playbook_on_include(self, included_file):
msg = 'included: %s for %s' % (included_file._filename, ", ".join([h.name for h in included_file._hosts]))
if 'item' in included_file._args:
msg += " => (item=%s)" % (self._get_item_label(included_file._args),)
self._display.display(msg, color=C.COLOR_SKIP)
def v2_playbook_on_stats(self, stats):