From 7676ccdbac8bea0cfca7574be9fe4f3dabc4c4d3 Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Fri, 1 Feb 2019 13:29:45 -0500 Subject: [PATCH] use custom venv in inventory prooting --- awx/main/management/commands/inventory_import.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/awx/main/management/commands/inventory_import.py b/awx/main/management/commands/inventory_import.py index d96ab7fb0e..bd9c8001ee 100644 --- a/awx/main/management/commands/inventory_import.py +++ b/awx/main/management/commands/inventory_import.py @@ -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):