mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-05 07:54:00 -07:00
added ansible_remote_tmp inventory var (#26754)
* added ansible_remote_tmp inventory var * fixed horrible crime of no space after #
This commit is contained in:
parent
462444b2be
commit
84367eacef
4 changed files with 11 additions and 10 deletions
|
@ -110,14 +110,16 @@ class ShellBase(object):
|
|||
# /var/tmp is not).
|
||||
|
||||
if system:
|
||||
if C.DEFAULT_REMOTE_TMP.startswith('/var/tmp'):
|
||||
# FIXME: create 'system tmp dirs' config/var and check tmpdir is in those values to allow for /opt/tmp, etc
|
||||
if tmpdir.startswith('/var/tmp'):
|
||||
basetmpdir = '/var/tmp'
|
||||
else:
|
||||
basetmpdir = '/tmp'
|
||||
elif tmpdir is None:
|
||||
basetmpdir = C.DEFAULT_REMOTE_TMP
|
||||
else:
|
||||
basetmpdir = tmpdir
|
||||
if tmpdir is None:
|
||||
basetmpdir = C.DEFAULT_REMOTE_TMP
|
||||
else:
|
||||
basetmpdir = tmpdir
|
||||
|
||||
basetmp = self.join_path(basetmpdir, basefile)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue