Adding a new module location

Hi,
The default location for ansible modules is /usr/share/ansible. Is there a way to append another location to this one. In the .cfg I only see the option to replace the default.

Thanks

You can specify multiple paths seperated by colons.

Please do continue to leave the default in there at the head of the list.

I still get the following error
ERROR: custom_module is not a legal parameter in an Ansible task or handler.

custom_module is a simple module i wrote to do some tests. It works fine when its in /usr/share/ansible but fails when i remove it from there and put in a specific module directory.

This is the line in /etc/asnible/ansible.cfg

library = /usr/share/ansible:/path/to/custom/module

I’m running ansible 1.6.2

​AFAIK you need to point to the directory, not the module itself?​

Yep, its pointing to the directory.

Just to make it clearer.
library = /usr/share/ansible:/path/to/custom/module_directory

"This is the line in /etc/asnible/ansible.cfg "

This path may be part of the problem.

Sorry for the typos in the post but I checked and verified there are no typos in the file :slight_smile:
All of the other stuff like custom locations for roles and plugins are working fine except for the modules part.