# custom action module include\_dir

**URL:** <https://forum.ansible.com/t/custom-action-module-include-dir/20313>\
**Category:** Ansible Developer\
**Created:** [January 22, 2016, 12:56pm UTC](https://forum.ansible.com/t/custom-action-module-include-dir/20313 "2016-01-22T12:56:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adham\_H](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@Adham\_H](https://forum.ansible.com/u/Adham_H)\
**Post date:** [January 22, 2016, 12:56pm UTC](https://forum.ansible.com/t/custom-action-module-include-dir/20313/1 "2016-01-22T12:56:55Z")

</div>

Hey,

I am currently using ansible v1. I have created a custom action module in v1 that is based on include\_vars that loads directory of yaml into an array.

And we just started upgrading to ansible v2 So I have to port my action module.

I tried to recreate that module on v2 and hit a wall.

I created a test repo [https://github.com/ahelal/test-include-var-behaviour/tree/master](https://github.com/ahelal/test-include-var-behaviour/tree/master) to demonstrate the behaviour.

The module is an exact copy of standard [include\_vars](https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/action/include_vars.py) of v2.  
Only difference it takes an argument source

`source = self._task.args.get('source')`

I pass the following variable as yaml file

`

---

<div class="post-metadata">

**Author:** ![Adham\_H](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@Adham\_H](https://forum.ansible.com/u/Adham_H)\
**Post date:** [January 29, 2016, 8:33pm UTC](https://forum.ansible.com/t/custom-action-module-include-dir/20313/2 "2016-01-29T20:33:16Z")

</div>

No input ?
