This might help:

Plugin writing guide:
https://docs.ansible.com/ansible/latest/dev_guide/developing_plugins.html

example:
https://gist.github.com/tgerla/bbfa956e5463361447c6


On Thursday, January 12, 2023 at 2:19:45 AM UTC-6 Jan Goyvaerts wrote:

> Let me rephrase it: I've got playbooks that should access locally defined 
> lookup plugins. Locally as in "not in a collection or role". Those lookup 
> plugins should be able to import common code and read common resource 
> files. The lookup plugin should be put into the directory 
> "/lookup_plugins". That is as far as I got. I've tried various directories 
> & methods to access the common code and resource files. That does 'not 
> work'.  So, the bottom line:
>
> 1. In what directory should I put the common code ? 
> 2. How to import the common code from within the lookup plugin ?
> 3. In what directory should I put the resource files ?
> 4. How to I open the resource files from within the lookup plugin ? (or in 
> the common code)
>
> thx
>
>
>
>
>
>
>
> On Wednesday, January 11, 2023 at 5:12:57 PM UTC+1 Brian Coca wrote:
>
>> How does this 'not work?' code in module_utils is used on controller 
>> side plugins all the time, though it is primarily intended for 
>> modules. 
>>
>> ---------- 
>> Brian Coca 
>>
>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2c150b6f-6c95-47d4-bb4c-0de6ece31275n%40googlegroups.com.

Reply via email to