For inventory scripts, I’m looking for a place to put data files to inventory scripts.
As inventory scripts do not know anything about some base dir, this needs to be in the scripts current dir, or some sub directory of it.
When combining scripts with InventoryDir, those data files should not interfere with InventoryParse (for ini files).
Would adding some config directory to the list of names to not be parsed in dir.py be accepteable?
If so, how do we name it? “config” ?
At the same time, I could make it to also avoid hidden files and folders (which was proposed recently, but I couldn’t find the list mail or issue where it was discussed)/
Serge
You should have inventory scripts look for them outside of the inventory dir.
How would a script know it’s location and how to go to the inventory base path? Keep in mind that an inventory script can be nested several directories deep. Ok, maybe by recursively going up it’s path maybe, but that seems less clean to me than grouping all files related to the inventory in one directory.
What’s the problem with such a trivial patch?
mvg,
Serge van Ginderachter
Follow up, 1.2 already ignores all files with a “.ini” extension when -i is a directory.
This should also solve the problem.
Oh indeed, I missed that. Assumed that was about files for ini.py
Indeed solves my question.
Thanks
mvg,
Serge van Ginderachter