Adding a new module location

645 views
Skip to first unread message

Mzp45

unread,
Jul 29, 2014, 9:30:07 AM7/29/14
to ansible...@googlegroups.com
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

Michael DeHaan

unread,
Jul 29, 2014, 9:35:06 AM7/29/14
to ansible...@googlegroups.com
You can specify multiple paths seperated by colons.

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




--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e78cb420-6d6e-4e58-9a3e-afac6d27c712%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mzp45

unread,
Jul 29, 2014, 10:17:07 AM7/29/14
to ansible...@googlegroups.com
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 

Serge van Ginderachter

unread,
Jul 29, 2014, 10:42:13 AM7/29/14
to ansible...@googlegroups.com

On 29 July 2014 16:17, Mzp45 <melze...@gmail.com> wrote:
library        = /usr/share/ansible:/path/to/custom/module


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

Mzp45

unread,
Jul 29, 2014, 10:44:09 AM7/29/14
to ansible...@googlegroups.com
Yep, its pointing to the directory. 

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

Michael DeHaan

unread,
Jul 29, 2014, 11:02:01 AM7/29/14
to ansible...@googlegroups.com
"This is the line in /etc/asnible/ansible.cfg "

This path may be part of the problem.



--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.

Mzp45

unread,
Jul 29, 2014, 11:39:58 AM7/29/14
to ansible...@googlegroups.com
Sorry for the typos in the post but I checked and verified there are no typos in the file :)
All of the other stuff like custom locations for roles and plugins are working fine except for the modules part. 
Reply all
Reply to author
Forward
0 new messages