# Adding an external module

**URL:** <https://forum.ansible.com/t/adding-an-external-module/24954>\
**Category:** Ansible Project\
**Created:** [July 11, 2017, 3:34pm UTC](https://forum.ansible.com/t/adding-an-external-module/24954 "2017-07-11T15:34:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Omri](https://avatars.discourse-cdn.com/v4/letter/o/bc79bd/32.png) [@Omri](https://forum.ansible.com/u/Omri)\
**Post date:** [July 11, 2017, 3:34pm UTC](https://forum.ansible.com/t/adding-an-external-module/24954/1 "2017-07-11T15:34:43Z")

</div>

Hi,  
Lately i have started to use Ansible, And i still trying to figure out how some things works.

I need to edit yaml file. I didn’t find any core model which i can use easily, So i had to find an [external module](https://github.com/kwoodson/yedit) which can do so.  
Can someone tell me what should i do in order to use this module?

I have tried to place the py file under …/ansible/lib/ansible/modules/extras, but i get an error when i run my playbook:

`  
The error appears to have been in ‘/etc/ansible/config/test.yml’: line 39, column 5, but may  
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: edit some yaml  
^ here

`

I didn’t install this server, and it might be that the configuration is not by the book. Anyway, i could write and run playbooks with no issues so far.

1. I would appreciate any help regarding using the external module.
2. If anyone familiar with any other easy module, which can edit a yaml file, i would like to know.

Thanks

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [July 13, 2017, 7:17pm UTC](https://forum.ansible.com/t/adding-an-external-module/24954/2 "2017-07-13T19:17:25Z")

</div>

In the same directory you have you playbook create a directory called library. Copy the file yedit.py in the library directory.

For more information see  
[https://docs.ansible.com/ansible/intro\_configuration.html#library](https://docs.ansible.com/ansible/intro_configuration.html#library)
