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, 2019 in Ansible by Manik
850 views
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, 2019 by Manik

Related Questions In Ansible

0 votes
1 answer

FAILED! => {"changed": false, "msg": "Parameter 'description' is required."}

Hi@akhtar, You got this error because you did ...READ MORE

answered Aug 7 in Ansible by MD
• 66,180 points
86 views
0 votes
1 answer
0 votes
1 answer
+15 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,450 points
729 views
+2 votes
1 answer
+1 vote
3 answers