Import to_uuid filter in a custom module

21 views
Skip to first unread message

Fabio Rocha

unread,
Nov 27, 2020, 6:02:55 PM11/27/20
to Ansible Development
Hi all.

I'm trying to import the to_uuid() filter function from plugins/filter/core.py to be used in a custom module I'm developing. Looked at Ansible documentation and around other sites but couldn't find an answer. Does anybody can help?

Felix Fontein

unread,
Nov 28, 2020, 4:41:19 AM11/28/20
to ansibl...@googlegroups.com
Hi,

if you mean an Ansible Python module, the answer is you can't. Modules
can only import from module_utils, and not from plugins or any other
part of Ansible

Cheers,
Felix


Reply all
Reply to author
Forward
0 new messages