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, 2019 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, 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, 2020 in Ansible by MD
• 95,300 points
0 votes
1 answer

fatal: [localhost]: FAILED! => {"changed": false, "msg": "boto required for this module"}

Hi@akhtar, As ansible use the python library in ...READ MORE

answered Aug 12, 2020 in Ansible by MD
• 95,300 points
0 votes
1 answer

FAILED! => {"changed": false, "msg": "state is mounted but all of the following are missing: fstype"}

Hi@akhtar, You need to pass some more arguments ...READ MORE

answered Sep 16, 2020 in Ansible by MD
• 95,300 points
+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
+2 votes
1 answer
+1 vote
3 answers