After installing docker with this role I have to use virtualenv with Ansible docker_* modules by specifying ansible_python_interpreter: '/usr/bin/env python-docker'
That's fine, but that conflicts with all other Ansible modules used in the same role or playbook, e.g. apt - they are inaccessible from the docker virtualenv.
As far as I understand, ansible_python_interpreter can only be set on a per-playbook basis.
After installing docker with this role I have to use virtualenv with Ansible
docker_*
modules by specifyingansible_python_interpreter: '/usr/bin/env python-docker'
That's fine, but that conflicts with all other Ansible modules used in the same role or playbook, e.g.
apt
- they are inaccessible from the docker virtualenv.As far as I understand,
ansible_python_interpreter
can only be set on a per-playbook basis.What is the solution for this?
Thanks!