Skip to content

Commit

Permalink
fix a bug that breaks isolated task execution
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanpetrello committed Aug 2, 2019
1 parent 9d2549b commit 4f8e693
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions awx/main/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -865,12 +865,14 @@ def build_params_process_isolation(self, instance, private_data_dir, cwd):
if getattr(settings, 'AWX_ANSIBLE_COLLECTIONS_PATHS', []):
show_paths.extend(settings.AWX_ANSIBLE_COLLECTIONS_PATHS)

pi_path = tempfile.mkdtemp(
prefix='ansible_runner_pi_',
dir=settings.AWX_PROOT_BASE_PATH
)
os.chmod(pi_path, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
self.cleanup_paths.append(pi_path)
pi_path = settings.AWX_PROOT_BASE_PATH
if not self.instance.is_isolated():
pi_path = tempfile.mkdtemp(
prefix='ansible_runner_pi_',
dir=settings.AWX_PROOT_BASE_PATH
)
os.chmod(pi_path, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
self.cleanup_paths.append(pi_path)

process_isolation_params = {
'process_isolation': True,
Expand Down

0 comments on commit 4f8e693

Please sign in to comment.