mirror of
https://github.com/ansible/awx.git
synced 2026-02-23 22:16:00 -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:
@@ -930,10 +930,17 @@ class BaseTask(object):
|
|||||||
'''
|
'''
|
||||||
Create a temporary directory for job-related files.
|
Create a temporary directory for job-related files.
|
||||||
'''
|
'''
|
||||||
path = tempfile.mkdtemp(prefix='awx_%s_' % instance.pk, dir=settings.AWX_PROOT_BASE_PATH)
|
pdd_wrapper_path = tempfile.mkdtemp(
|
||||||
os.chmod(path, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
|
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:
|
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')
|
runner_project_folder = os.path.join(path, 'project')
|
||||||
if not os.path.exists(runner_project_folder):
|
if not os.path.exists(runner_project_folder):
|
||||||
# Ansible Runner requires that this directory exists.
|
# Ansible Runner requires that this directory exists.
|
||||||
|
|||||||
Reference in New Issue
Block a user