|
|
|
@ -552,9 +552,11 @@ class Runner(object):
|
|
|
|
|
host_variables = self.inventory.get_variables(host)
|
|
|
|
|
port = host_variables.get('ansible_ssh_port', self.remote_port)
|
|
|
|
|
inject = self.setup_cache[host].copy()
|
|
|
|
|
inject['hostvars'] = self.setup_cache
|
|
|
|
|
inject.update(host_variables)
|
|
|
|
|
inject.update(self.module_vars)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
items = self.module_vars.get('items', [])
|
|
|
|
|
if isinstance(items, basestring) and items.startswith("$"):
|
|
|
|
|
items = items.replace("$","")
|
|
|
|
@ -646,7 +648,8 @@ class Runner(object):
|
|
|
|
|
self.callbacks.on_unreachable(host, result.result)
|
|
|
|
|
else:
|
|
|
|
|
data = result.result
|
|
|
|
|
result.result['item'] = inject.get('item', None)
|
|
|
|
|
if 'item' in inject:
|
|
|
|
|
result.result['item'] = inject['item']
|
|
|
|
|
if 'skipped' in data:
|
|
|
|
|
self.callbacks.on_skipped(result.host)
|
|
|
|
|
elif not result.is_successful():
|
|
|
|
|