Error saying "FAILED! => {"changed": false, "failed": true, "msg": "the python pymongo module is required"}"

0 votes

I'm trying to install PyMongo python package using pip. 

My playbook:

- hosts: tag_Name_Development
  become: true
  remote_user: user
    - name: install python tools
      yum: name={{ item }} state=latest
        - gcc
        - python-devel
        - python-setuptools
        - python-pip

    - name: install pymongo
      pip: name=pymongo state=latest

    - name: add admin user to mongo
        login_port: 27017
        database: admin
        name: admin
        password: "{{ mongodb.admin_pass }}"
        roles: userAdminAnyDatabase
        state: present

I still end up with the following error:

FAILED! => {"changed": false, "failed": true, "msg": "the python pymongo module is required"}

Feb 9 in Ansible by Manik
Do you have any other version of python installed?
I'll check and let you know

1 answer to this question.

0 votes
Hey @Monish I figured what my issue was, I had two versions of python installed, 2.6 and 2.7 and when I tried installing pymongo, it got installed on the 2.6 python version instead of my default python version 2.7.

Thanks for the early response though.
answered Feb 9 by Manik

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer

Error saying "Failed to find required executable npm in paths"

Hey @Thomas,  Seems like those extra paths have ...READ MORE

answered Jan 10 in Ansible by Naina
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
0 votes
1 answer
0 votes
3 answers