issue #301: support expandvars() for remote_tmp only.
Vanilla Ansible support expandvars-like expansions widely in a variety of places. Prefer to whitelist those we need, rather than sprinkling hellish semantics everywhere.
This commit is contained in:
parent
417e02bd6d
commit
b6d6468c92
|
@ -407,6 +407,9 @@ def make_temp_directory(base_dir):
|
|||
:returns:
|
||||
Newly created temporary directory.
|
||||
"""
|
||||
# issue #301: remote_tmp may contain $vars.
|
||||
base_dir = os.path.expandvars(base_dir)
|
||||
|
||||
if not os.path.exists(base_dir):
|
||||
os.makedirs(base_dir, mode=int('0700', 8))
|
||||
return tempfile.mkdtemp(
|
||||
|
|
|
@ -17,8 +17,9 @@ timeout = 10
|
|||
# On Travis, paramiko check fails due to host key checking enabled.
|
||||
host_key_checking = False
|
||||
|
||||
# Required by integration/runner__remote_tmp.yml
|
||||
remote_tmp = ~/.ansible/mitogen-tests/
|
||||
# "mitogen-tests" required by integration/runner/remote_tmp.yml
|
||||
# "$HOME" required by integration/action/make_tmp_path.yml
|
||||
remote_tmp = $HOME/.ansible/mitogen-tests/
|
||||
|
||||
[ssh_connection]
|
||||
ssh_args = -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s
|
||||
|
|
Loading…
Reference in New Issue