mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
remote user should rely on context, not direct var
this can cause issues with non-ssh connections and/or ansible_user
This commit is contained in:
@@ -102,7 +102,7 @@ class ActionModule(ActionBase):
|
||||
result['msg'] = "src and dest are required"
|
||||
return result
|
||||
|
||||
remote_user = task_vars.get('ansible_ssh_user') or self._play_context.remote_user
|
||||
remote_user = self._play_context.remote_user
|
||||
if boolean(remote_src):
|
||||
result.update(self._execute_module(tmp=tmp, task_vars=task_vars))
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user