Add the PID of the Ansible process to local_tmp directory. (#16589)
This aids in associating a leftover cachedir with a previous run of Ansible. Came about because of #16489
This commit is contained in:
parent
0e16a5f3ee
commit
3f4027f7b4
1 changed files with 2 additions and 1 deletions
|
@ -76,7 +76,8 @@ def get_config(p, section, key, env_var, default, boolean=False, integer=False,
|
||||||
value = shell_expand(value)
|
value = shell_expand(value)
|
||||||
if not os.path.exists(value):
|
if not os.path.exists(value):
|
||||||
os.makedirs(value, 0o700)
|
os.makedirs(value, 0o700)
|
||||||
value = tempfile.mkdtemp(prefix='ansible-local-tmp', dir=value)
|
prefix = 'ansible-local-%s' % os.getpid()
|
||||||
|
value = tempfile.mkdtemp(prefix=prefix, dir=value)
|
||||||
elif ispathlist:
|
elif ispathlist:
|
||||||
if isinstance(value, string_types):
|
if isinstance(value, string_types):
|
||||||
value = [shell_expand(x, expand_relative_paths=expand_relative_paths) \
|
value = [shell_expand(x, expand_relative_paths=expand_relative_paths) \
|
||||||
|
|
Loading…
Reference in a new issue