Fix removing of temporary files
This commit is contained in:
parent
0ebf4b2d5a
commit
48898993b9
1 changed files with 1 additions and 1 deletions
|
@ -222,7 +222,7 @@ class Runner(object):
|
||||||
raise errors.AnsibleError("module is missing interpreter line")
|
raise errors.AnsibleError("module is missing interpreter line")
|
||||||
|
|
||||||
cmd = shebang.replace("#!","") + " " + cmd
|
cmd = shebang.replace("#!","") + " " + cmd
|
||||||
if tmp.find("tmp") != -1 and C.DEFAULT_KEEP_REMOTE_FILES == '1':
|
if tmp.find("tmp") != -1 and C.DEFAULT_KEEP_REMOTE_FILES != '1':
|
||||||
cmd = cmd + "; rm -rf %s >/dev/null 2>&1" % tmp
|
cmd = cmd + "; rm -rf %s >/dev/null 2>&1" % tmp
|
||||||
res = self._low_level_exec_command(conn, cmd, tmp, sudoable=True)
|
res = self._low_level_exec_command(conn, cmd, tmp, sudoable=True)
|
||||||
return ReturnData(conn=conn, result=res)
|
return ReturnData(conn=conn, result=res)
|
||||||
|
|
Loading…
Reference in a new issue