I’m having trouble figuring out how I can run a task with ‘expect’ module in a virtualenv and not have my other tasks run in that virtualenv.
The only way I’ve found to run an expect task in a virtualenv is to set_fact ansible_python_interpreter, but once I’ve done that, I cannot unset it, so all python-related tasks that run after that also run in the same virtualenv. Is there some way to set the python interpreter for only a single expect task?
I use pew (https://github.com/berdario/pew) for managing virtualenvs, but that is likely not relevant.
Thanks,
John