mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-02-04 08:01:49 +00:00
Merge pull request #82 from bmv126/synchronize_private_key_issue
Fix for private_key overriding in synchronize module
Reviewed-by: Adam Miller <admiller@redhat.com>
https://github.com/maxamillion
This commit is contained in:
commit
d1fff45191
12 changed files with 1943 additions and 4 deletions
|
|
@ -333,10 +333,8 @@ class ActionModule(ActionBase):
|
|||
user = task_vars.get('ansible_ssh_user') or self._play_context.remote_user
|
||||
|
||||
# Private key handling
|
||||
private_key = self._play_context.private_key_file
|
||||
|
||||
if private_key is not None:
|
||||
_tmp_args['private_key'] = private_key
|
||||
# Use the private_key parameter if passed else use context private_key_file
|
||||
_tmp_args['private_key'] = _tmp_args.get('private_key', self._play_context.private_key_file)
|
||||
|
||||
# use the mode to define src and dest's url
|
||||
if _tmp_args.get('mode', 'push') == 'pull':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue