1
0
Fork 0
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:
ansible-zuul[bot] 2020-09-18 05:24:11 +00:00 committed by GitHub
commit d1fff45191
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 1943 additions and 4 deletions

View file

@ -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':