mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +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:
@@ -139,7 +139,7 @@ class ActionModule(ActionBase):
|
||||
delete_remote_tmp = (len(source_files) == 1)
|
||||
|
||||
# If this is a recursive action create a tmp path that we can share as the _exec_module create is too late.
|
||||
remote_user = task_vars.get('ansible_ssh_user') or self._play_context.remote_user
|
||||
remote_user = self._play_context.remote_user
|
||||
if not delete_remote_tmp:
|
||||
if tmp is None or "-tmp-" not in tmp:
|
||||
tmp = self._make_tmp_path(remote_user)
|
||||
|
||||
Reference in New Issue
Block a user