mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 23:12:08 -03:30
Merge pull request #9646 from shanemcd/pdd-wrapper
Create a wrapper directory for the private data dir Reviewed-by: None <None> Reviewed-by: Ryan Petrello <None> Reviewed-by: Elijah DeLee <kdelee@redhat.com>
This commit is contained in:
commit
305f717e88
@ -930,10 +930,17 @@ class BaseTask(object):
|
||||
'''
|
||||
Create a temporary directory for job-related files.
|
||||
'''
|
||||
path = tempfile.mkdtemp(prefix='awx_%s_' % instance.pk, dir=settings.AWX_PROOT_BASE_PATH)
|
||||
os.chmod(path, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
|
||||
pdd_wrapper_path = tempfile.mkdtemp(
|
||||
prefix=f'pdd_wrapper_{instance.pk}_',
|
||||
dir=settings.AWX_PROOT_BASE_PATH
|
||||
)
|
||||
os.chmod(pdd_wrapper_path, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
|
||||
if settings.AWX_CLEANUP_PATHS:
|
||||
self.cleanup_paths.append(path)
|
||||
self.cleanup_paths.append(pdd_wrapper_path)
|
||||
|
||||
path = tempfile.mkdtemp(prefix='awx_%s_' % instance.pk,
|
||||
dir=pdd_wrapper_path)
|
||||
os.chmod(path, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
|
||||
runner_project_folder = os.path.join(path, 'project')
|
||||
if not os.path.exists(runner_project_folder):
|
||||
# Ansible Runner requires that this directory exists.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user