Wildcard or regex matching for grain keys when looking for values
It would be useful if the grains.item and grains.get functions could take a wildcard or regex as the keys to look for. For example, if there are a number of grains with the same prefix (e.g. "ccs_") then something like "grains.item 'ccs_*' would allow a user to list the values of all those grains without having to know about and list each one separately. If it is not possible to modify these functions then maybe a new one called something like grains.match that takes type=<glob|pcre> and a filter?
@Tanoti, thanks for the report. I think this should be supported for the pillar and mine data stores as well for utility and feature parity.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
I strongly feel this is a worthwhile improvement. If someone would care to point me at the right parts of the code, I would be happy to try and work out a patch.
Thank you for updating this issue. It is no longer marked as stale.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
Again, I strongly feel this is a worthwhile improvement. If someone would care to point me at the right parts of the code, I would be happy to try and work out a patch.
Thank you for updating this issue. It is no longer marked as stale.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
Again, I strongly feel this is a worthwhile improvement. If someone would care to point me at the right parts of the code, I would be happy to try and work out a patch.
Thank you for updating this issue. It is no longer marked as stale.
I would also like to see this functionality added!
bummer we don't have this functionality
This would be a really nice option to have, I'm working through an issue right now trying to manage files using the pillar items but I have a situation like this:
websites:
<site1>:
site_SSL: <value>
<site2>:
site_SSL: <value>
and so on. I want to be able to target the data like this: websites:*:site_SSL