mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
This commit is contained in:
parent
7d8a4b13a5
commit
ba420c47cd
4 changed files with 5 additions and 4 deletions
|
@ -316,6 +316,8 @@ class ActionModule(ActionBase):
|
|||
if boolean(_tmp_args.get('set_remote_user', 'yes'), strict=False):
|
||||
if use_delegate:
|
||||
user = task_vars.get('ansible_delegated_vars', dict()).get('ansible_ssh_user', None)
|
||||
if not user:
|
||||
user = task_vars.get('ansible_ssh_user') or self._play_context.remote_user
|
||||
if not user:
|
||||
user = C.DEFAULT_REMOTE_USER
|
||||
|
||||
|
@ -326,7 +328,6 @@ class ActionModule(ActionBase):
|
|||
private_key = self._play_context.private_key_file
|
||||
|
||||
if private_key is not None:
|
||||
private_key = os.path.expanduser(private_key)
|
||||
_tmp_args['private_key'] = private_key
|
||||
|
||||
# use the mode to define src and dest's url
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue