Is there a way to access host / group vars from a custom writing module ? I would like to avoid passing all the necessary parameters as module parameters.
My module is written in Python and I am using a template. I checked almost all the available vars, but they are not stored anywhere:
def main(): pprint(dir()) pprint(globals()) pprint(locals()) for name in vars().keys(): print(name)
Now, I hope they are somehow accessible through undocumented utils modules.
I think this is not possible, since the module runs on the target machine, and probably the facts / hosts / vars groups are not transmitted along with the module ...
Edit: The utils module has now been found, and it does not look promising.
source share