Merge pull request #545 from ryanpetrello/fix-7746

work around an ansible bug that can cause project syncs to fail
This commit is contained in:
Ryan Petrello 2017-10-25 11:37:15 -04:00 committed by GitHub
commit 652facba9f

View File

@ -1017,6 +1017,9 @@ class RunJob(BaseTask):
plugin_path = ':'.join(plugin_dirs)
env = super(RunJob, self).build_env(job, **kwargs)
env = self.add_ansible_venv(env, add_awx_lib=kwargs.get('isolated', False))
# give ansible a hint about the intended tmpdir to work around issues
# like https://github.com/ansible/ansible/issues/30064
env['TMPDIR'] = settings.AWX_PROOT_BASE_PATH
# Set environment variables needed for inventory and job event
# callbacks to work.
env['JOB_ID'] = str(job.pk)