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:
Toshio Kuratomi 2018-02-15 09:01:02 -08:00 committed by GitHub
parent 2678508d42
commit 06f73ad578
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 99 additions and 92 deletions

View file

@ -12,7 +12,7 @@ DOCUMENTATION = '''
description:
- The only option when using 'winrm' as a connection plugin
options:
remote_temp:
remote_tmp:
description:
- Temporary directory to use on targets when copying files to the host.
default: '%TEMP%'
@ -1883,7 +1883,7 @@ class ShellModule(ShellBase):
# Windows does not have an equivalent for the system temp files, so
# the param is ignored
basefile = self._escape(self._unquote(basefile))
basetmpdir = tmpdir if tmpdir else self.get_option('remote_temp')
basetmpdir = tmpdir if tmpdir else self.get_option('remote_tmp')
script = '''
$tmp_path = [System.Environment]::ExpandEnvironmentVariables('%s')