# Searching the role path when developing a module

**URL:** <https://forum.ansible.com/t/searching-the-role-path-when-developing-a-module/14770>\
**Category:** Ansible Project\
**Created:** [March 14, 2014, 1:01am UTC](https://forum.ansible.com/t/searching-the-role-path-when-developing-a-module/14770 "2014-03-14T01:01:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Cholakian1](https://avatars.discourse-cdn.com/v4/letter/a/3da27b/32.png) [@Andrew\_Cholakian1](https://forum.ansible.com/u/Andrew_Cholakian1)\
**Post date:** [March 14, 2014, 1:01am UTC](https://forum.ansible.com/t/searching-the-role-path-when-developing-a-module/14770/1 "2014-03-14T01:01:50Z")

</div>

Hi, i’m currently writing a module that takes a directory of configuration files as an argument. What would I need to do to have it take an argument ‘foo’, and find it at either ansible\_base\_dir/foo and ansible\_base\_dir/roles/rolename/foo

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [March 14, 2014, 2:32pm UTC](https://forum.ansible.com/t/searching-the-role-path-when-developing-a-module/14770/2 "2014-03-14T14:32:53Z")

</div>

I assume you mean an action plugin? (as basic modules don’t take files as inputs)

This is the path\_dwim stuff that all the other modules do, you might want to look at something like “action\_plugins/copy” for reference.
