mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Merge pull request #3692 from tima/action-init
Added support of an optional init method for action modules like rsync that need to alter the connection and other inject data before it's established.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user