Trouble integrating custom module_utils module

13 views
Skip to first unread message

Andrei Pashkin

unread,
Jan 14, 2019, 5:00:17 PM1/14/19
to Ansible Project
Hello!

I tried to write a custom module_utils module, I set up everything according to the docs, but for some reason I get an error:
Skipping plugin (...) as it seems to be invalid: No module named ...

I've isolated the problem in a small project:

To reproduce the issue it's enough to have Ansible installed and then execute "run.sh"

Can someone please look into it?

Matt Martz

unread,
Jan 14, 2019, 5:24:38 PM1/14/19
to ansible...@googlegroups.com
We do not currently support importing custom module_utils from anything other than a module.  As such, no other custom plugin types can import from a custom module_utils.


--
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/eba65537-7514-477d-bb7e-98c48374f4d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Matt Martz
@sivel
sivel.net

Andrei Pashkin

unread,
Jan 14, 2019, 11:10:31 PM1/14/19
to Ansible Project
That makes it clear, thanks a lot!

Andrei Pashkin

unread,
Jan 19, 2019, 1:36:49 AM1/19/19
to Ansible Project
If someone having the same problem - I've found a workaround. I just use imp.find_module()/imp.load_module()functions from the standard library to load the module with shared code into a plugin module.
Reply all
Reply to author
Forward
0 new messages