# Add module search path with Ansible 2.x API

**URL:** <https://forum.ansible.com/t/add-module-search-path-with-ansible-2-x-api/22928>\
**Category:** Ansible Project\
**Created:** [October 31, 2016, 6:27pm UTC](https://forum.ansible.com/t/add-module-search-path-with-ansible-2-x-api/22928 "2016-10-31T18:27:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Evelio\_VILA](https://avatars.discourse-cdn.com/v4/letter/e/f19dbf/32.png) [@Evelio\_VILA](https://forum.ansible.com/u/Evelio_VILA)\
**Post date:** [October 31, 2016, 6:27pm UTC](https://forum.ansible.com/t/add-module-search-path-with-ansible-2-x-api/22928/1 "2016-10-31T18:27:04Z")

</div>

Hi list,

I have a custom python module A that imports another custom module B. In Ansible pre 2.x API I was able to do something like

ansible.utils.plugins.action\_loader.add\_package(my.custom.package.B)

to add the package. What would be the best way to do that with the 2.x API.

[http://docs.ansible.com/ansible/dev\_guide/developing\_api.html](http://docs.ansible.com/ansible/dev_guide/developing_api.html)

cheers,  
Evelio
