diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index d90763734f..277cada127 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -534,6 +534,8 @@ class Runner(object): self.callbacks.on_skipped(host, inject.get('item',None)) return ReturnData(host=host, result=result) + if getattr(handler, 'setup', None) is not None: + handler.setup(module_name, inject) conn = None actual_host = inject.get('ansible_ssh_host', host) # allow ansible_ssh_host to be templated