Commit 969edabd by Michael DeHaan

Merge pull request #2322 from bcoca/remote_tmp_override

added check for starting $HOME for remote_tmp so as to non root sudo override
parents 9980cfcc 76f70928
......@@ -573,7 +573,7 @@ class Runner(object):
basefile = 'ansible-%s-%s' % (time.time(), random.randint(0, 2**48))
basetmp = os.path.join(C.DEFAULT_REMOTE_TMP, basefile)
if self.sudo and self.sudo_user != 'root':
if self.sudo and self.sudo_user != 'root' and basetmp.startswith('$HOME'):
basetmp = os.path.join('/tmp', basefile)
cmd = 'mkdir -p %s' % basetmp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment