python interpreter from venv applied to remote hosts

When I run awx in a venv for the openstacksdk package I need locally, and then delegate a task to a different host that doesn’t have this venv, the remote host still tries to make use of the python interpreter from the venv.

How do I tell awx to look for the default python interpreter?

I’m basically adding a server to the inventory and then using delegate_to on the tasks block.

https://pastebin.mozilla.org/JkDq0FaE

The error I get is “/bin/sh: /opt/my-envs/openstacksdk/bin/python3: No such file or directory” You probably need to set an interpreter.

For now, I’ve added a host var ‘ansible_python_interpreter’ and set it to the known path of a working python3 interpreter. That seems to work.

–John