Access facts in custom filter plugin

Hi there,

First post here, if something is amiss on my part, please bear with me.

How do I access facts in my own filter plugin? I know I can (and did) write a function and pass the fact as an argument, but perhaps it is possible to get the fact’s value in the body of a filter function?

My specific use case is something like ‘fqdn_rand’ in Puppet, but I guess if I had the facts accessible in plugins, I would just write more plugins to hide some more complicated or ugly things :slight_smile:

Thanks in advance.

Best regards,
Łukasz Górski

filter plugins don't have access to anything except the arguments
passed directly:

arg1 | filter(arg2, arg3, ...)

I hoped for some clever hack… Thanks anyway :slight_smile:

Best regards,
Łukasz Górski

W dniu wtorek, 2 lutego 2016 15:41:06 UTC+1 użytkownik Brian Coca napisał: