-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wildcards in default_file block #8
Comments
Eventually, I'm sure you'll be modifying only one file though. Would that kind of approach work for you? https://github.com/hercules-team/augeasproviders_grub/blob/master/lib/puppet/provider/kernel_parameter/grub.rb#L10-L12 |
That doesn't really help, it's not an "either/or" pattern. RANCiD has the concept of groups which are collections of network devices and it's quite common to have more than one group. Each group is a separate directory with a separate |
It seems the only sticky bits are the I can't see anything else that might be confused with a wildcard so would it be possible to expose some method of selectively disabling that |
OK. What do you think @domcleal ? |
I'm trying to create a new provider for managing devices in RANCiD using the lens I've created in hercules-team/augeas/pull/514 and I need to use a wildcard to match potentially multiple files with the pattern
/etc/rancid/*/router.db
. The lens in question works inaugtool
as a standalone lens with this pattern but I've found I can't use the same pattern in thedefault_file
block as it hits https://github.com/hercules-team/augeasproviders_core/blob/604680cb5fe7e32fd1ad1051fc34ef100a4d6923/lib/puppet/provider/augeasprovider/default.rb#L555 which errors when there are multiple matches.If I comment out that line then the provider seems to work using
puppet resource rancid_device ...
however I can see in the code there are a few places which expect to be given a single file and it's likely only working by fluke.My provider is here: https://github.com/bodgit/puppet-rancid/blob/master/lib/puppet/provider/rancid_device/augeas.rb
I'm not sure if the answer is some
Dir.glob
action somewhere?The text was updated successfully, but these errors were encountered: