hnimminh / libresbc

An open source Session Border Controller 🌟 The SBC you dream about 🗽 LibreSBC will help you save thousands of dollars.
https://github.com/hnimminh/libresbc
MIT License
357 stars 80 forks source link

Define python3 as default interpreter on target #20

Closed khorsmann closed 2 years ago

khorsmann commented 2 years ago

With the change above you fix the python2 vs python3 pip3 install issues on target host.

If you didnt defined that, you got an error (default debian net-install comes with python2.7 as /usr/bin/python and this happend):

The full traceback is: Traceback (most recent call last): File "/tmp/ansible_pip_payload_8aamVy/ansible_pip_payload.zip/ansible/modules/packaging/language/pip.py", line 271, in ImportError: No module named pkg_resources fatal: [sbc01.example.com]: FAILED! => { "changed": false, "invocation": { "module_args": { "chdir": null, "editable": false, "executable": "pip3", "extra_args": null, "name": null, "requirements": "/opt/libresbc/0.5.7/liberator/requirements.txt", "state": "present", "umask": null, "version": null, "virtualenv": null, "virtualenv_command": "virtualenv", "virtualenv_python": null, "virtualenv_site_packages": false } }, "msg": "Failed to import the required Python library (setuptools) on sbc01.example.com's Python /usr/bin/python. Please read module documentation and install in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter" }