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
2,494 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, 2020 in Ansible by MD
• 95,460 points
2,542 views
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,460 points
4,200 views
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,460 points
2,637 views
+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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,035 views
+2 votes
1 answer
+1 vote
3 answers
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP