mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Added support of an optional setup 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:
parent
1fd863cf5d
commit
11beb38c66
1 changed files with 2 additions and 0 deletions
|
@ -503,6 +503,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)
|
||||
actual_port = port
|
||||
|
|
Loading…
Reference in a new issue