-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Describe the bug
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named 'phpypam'
I am using Debian 12 and PIP is not allowed to install packages globally. Before I used pip install phpypam globally and it worked.
Now I have created a venv on the my ipam VM. When running my ansible-playbook from a controller node. I get this message, even though I try to set ansible_python_interpreter.
changing ansible_python_interprer the command 'which python' always returns /usr/bin/python on the ipam VM, instead of the venv python.
The flow of using ansible:
Controller (Uses Venv with ansible installed e.g. ~/git-repo/with-playbook/venv/bin/activate) -> IPAM VM ( Has /opt/docker_venv/bin/python that I set with the ansible_python_interpreter)
To Reproduce
I tried to change the python_interpreter to use different python version on the ipam VM. NB! the interpeter venv path is the one in the VM not in the controller. I am not sure how it works. which version of python it uses?
Expected behavior
Use correct venv.
Versions:
- Ansible:
- phpipam-ansible-modules:
- phpypam:
- phpIPAM:
Additional context
Add any other context about the problem here.
