mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
Normalize usage of temp and tmp on tmp (#36221)
* Normalize usage of temp and tmp on tmp * Rename system_tmps system_tmpdirs * Add ANSIBLE_REMOTE_TMP spelling of environment variables
This commit is contained in:
parent
2678508d42
commit
06f73ad578
22 changed files with 99 additions and 92 deletions
|
@ -84,7 +84,7 @@ class ActionModule(ActionBase):
|
|||
|
||||
if not remote_src:
|
||||
# transfer the file to a remote tmp location
|
||||
tmp_src = self._connection._shell.join_path(self._connection._shell.tempdir, 'source')
|
||||
tmp_src = self._connection._shell.join_path(self._connection._shell.tmpdir, 'source')
|
||||
self._transfer_file(source, tmp_src)
|
||||
|
||||
# handle diff mode client side
|
||||
|
@ -92,7 +92,7 @@ class ActionModule(ActionBase):
|
|||
|
||||
if not remote_src:
|
||||
# fix file permissions when the copy is done as a different user
|
||||
self._fixup_perms2((self._connection._shell.tempdir, tmp_src))
|
||||
self._fixup_perms2((self._connection._shell.tmpdir, tmp_src))
|
||||
# Build temporary module_args.
|
||||
new_module_args = self._task.args.copy()
|
||||
new_module_args.update(
|
||||
|
@ -120,5 +120,5 @@ class ActionModule(ActionBase):
|
|||
except AnsibleAction as e:
|
||||
result.update(e.result)
|
||||
finally:
|
||||
self._remove_tmp_path(self._connection._shell.tempdir)
|
||||
self._remove_tmp_path(self._connection._shell.tmpdir)
|
||||
return result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue