Hello guys
I work with an API that is pretty old and only supports get of a whole bunch of data objects.
The data is quite complex as I decided to define my own module/plugin to parse and store the result in memory by using a dictionary with support of lookup by a specific keyword.
So what I wanted is to run once the data into memory and do multiple lookups in different tasks. Unfortunately the python class gets constructed for every call…
I tested outside of ansible using a module (subfolder & __init__py). Like this I have singleton behavior.
Unfortunately I did not find a way inside of ansible to do this.
So might you know how to build a singleton or where to store a module folder to import from my custom module (like import custom.myparser)?
many thanks in advance!