# getting error while installing mongoDB on remote ubuntu server via ansible

**URL:** <https://forum.ansible.com/t/getting-error-while-installing-mongodb-on-remote-ubuntu-server-via-ansible/30490>\
**Category:** Ansible Developer\
**Tags:** ubuntu\
**Created:** [June 4, 2019, 5:00pm UTC](https://forum.ansible.com/t/getting-error-while-installing-mongodb-on-remote-ubuntu-server-via-ansible/30490 "2019-06-04T17:00:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vidyashankar\_Kandgal](https://avatars.discourse-cdn.com/v4/letter/v/90ced4/32.png) [@Vidyashankar\_Kandgal](https://forum.ansible.com/u/Vidyashankar_Kandgal)\
**Post date:** [June 4, 2019, 5:00pm UTC](https://forum.ansible.com/t/getting-error-while-installing-mongodb-on-remote-ubuntu-server-via-ansible/30490/1 "2019-06-04T17:00:41Z")

</div>

**1. For Playbook implemented see below:**

# Install mongodb

---

<div class="post-metadata">

**Author:** ![Ronald\_Lawhorn](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@Ronald\_Lawhorn](https://forum.ansible.com/u/Ronald_Lawhorn)\
**Post date:** [June 6, 2019, 4:13am UTC](https://forum.ansible.com/t/getting-error-while-installing-mongodb-on-remote-ubuntu-server-via-ansible/30490/2 "2019-06-06T04:13:08Z")

</div>

It looks like the issue is with the list apt uses to retrieve sources…

_Malformed entry 2 in list file /etc/apt/sources.list.d/mongodb.list (Component)\nE: The list of sources could not be read._  
[#ref](https://wiki.debian.org/SourcesList)

You may have to template in the file if it’s not present on the target.

Hope that helps
