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
  tasks:
    - name: install python tools
      yum: name={{ item }} state=latest
      with_items:
        - gcc
        - python-devel
        - python-setuptools
        - python-pip

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

    - name: add admin user to mongo
      mongodb_user:
        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
69 views
Do you have any other version of python installed?
I'll check and let you know

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
74 views
+13 votes
2 answers
0 votes
1 answer
0 votes
3 answers

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.