[FIXED] While running Ansible playbook getting error install request library


I am trying to create a vm on gcp using ansible playbook on my ansible master machine
my ansible master is on ubuntu-desktop(WSL)
I have installed requests and google-auth
but while running playbook, I am getting error

"FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "changed": false, "msg": "Please install the requests library"}"

and while running "pip3 install requests". It is prompting it’s already present
"Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (2.22.0)"


I have solved the problem, I was getting "please install the requests library" because I was not installing requests on host server,
requests module needs to be installed on slave machine as well.

Answered By – avnshrai

Answer Checked By – Pedro (Easybugfix Volunteer)

Leave a Reply

(*) Required, Your email will not be published