# Custom facts module question - running a copy of an ansible module from the "library" dir

**URL:** <https://forum.ansible.com/t/custom-facts-module-question-running-a-copy-of-an-ansible-module-from-the-library-dir/27611>\
**Category:** Ansible Project\
**Created:** [May 24, 2018, 6:42am UTC](https://forum.ansible.com/t/custom-facts-module-question-running-a-copy-of-an-ansible-module-from-the-library-dir/27611 "2018-05-24T06:42:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Taida](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@Taida](https://forum.ansible.com/u/Taida)\
**Post date:** [May 24, 2018, 6:42am UTC](https://forum.ansible.com/t/custom-facts-module-question-running-a-copy-of-an-ansible-module-from-the-library-dir/27611/1 "2018-05-24T06:42:12Z")

</div>

Hello everyone,

I’m trying to understand how to write custom modules. For that, I’ve copied an existing ios\_facts.py to a playbook library directory and renamed it to slb\_facts2.  
I thought that just copying the module would keep it working, however it doesn’t execute from the playbook because of the following errors.

Is something special required to run an unmodified ansble module from the /library/ dir?

Obviously main ios\_facts module works fine on the same devices.

Thank you very much for suggestions.

$ cat test\_facts.yml
