use custom venv in inventory prooting

This commit is contained in:
AlanCoding 2019-02-01 13:29:45 -05:00
parent 4626aa0144
commit 7676ccdbac
No known key found for this signature in database
GPG Key ID: FD2C3C012A72926B

View File

@ -141,6 +141,9 @@ class AnsibleInventoryLoader(object):
kwargs['proot_show_paths'] = [functioning_dir(self.source)]
logger.debug("Running from `{}` working directory.".format(cwd))
if self.venv_path != settings.ANSIBLE_VENV_PATH:
kwargs['proot_custom_virtualenv'] = self.venv_path
return wrap_args_with_proot(cmd, cwd, **kwargs)
def command_to_json(self, cmd):