Set HOME to work root

This lets things like ~.ssh/known_hosts work as expected.

Change-Id: Id2ea5c672135dbf8314a8a07efe4e48fb23fb22f
Co-Authored-By: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
James E. Blair 2017-06-28 17:12:26 -07:00
parent 6397ae24a2
commit 290ac63a17
1 changed files with 3 additions and 0 deletions

View File

@ -1282,6 +1282,9 @@ class AnsibleJob(object):
ssh_auth_sock=env_copy.get('SSH_AUTH_SOCK'))
env_copy['ANSIBLE_CONFIG'] = config_file
# NOTE(pabelanger): Default HOME variable to jobdir.work_root, as it is
# possible we don't bind mount current zuul user home directory.
env_copy['HOME'] = self.jobdir.work_root
with self.proc_lock:
if self.aborted: