Issue #614 has been updated by adam.
luke wrote: > The problem is that without this feature you can't say "manage X if it's > present, but ignore otherwise". Wouldn't this just be a different setting for "ensure"? I'm not sure I see why this means you have to have no defaults. > E.g., I can currently use a file resource to manage a file if it's there but > do nothing if it's not. If all resource types have default values for > ensure, then any resource I'm managing is automatically created if it's not > there, which is often not what I want. Sometimes, resources are present just > for ordering, rather than for any management at all. It's often what you do want - the overwhelming case is that you specify a resource because you want to manage it, not because you don't. The converse of your argument appears to be true: if you want to manage a resource only if it exists, that should be an option to ensure. It shouldn't be the default. > As to your point about needing to add information to 629 resources, of course > that's not true -- you can add a line or three of default values in your site > manifest and be done. There are multiple other ways to get DRY, also, > without building it into the framework. Sure - but that has an impact on module re-distribution as well. If one of the goals is portability, using defaults like this is a serious limiter: you won't be able to if you want others to use your module. > The basic point here is, with default values there are things that can't be > done, and without them, you sometimes have to spend a bit more work but the > framework as a whole is more flexible. I don't understand what can't be done. We're talking defaults - so any other possible setting is easily created as another option to "ensure", right? The behavior you describe could be turned on for resources that require it. > Is there a different solution you can recommend that keeps the framework > flexible enough to support managing present files but not creating absent > files? Create an "ensure => manage" setting, that only manages files if they exist? Adam ---------------------------------------- Feature #614: Resource types should never have a default value for 'ensure' http://projects.reductivelabs.com/issues/show/614 Author: luke Status: Accepted Priority: Normal Assigned to: community Category: RAL Target version: Complexity: Medium Patch: None Affected version: 0.24.4 Keywords: Some of the resource types, e.g., 'user', have default values (usually 'present') for 'ensure', but most do not. All resource types that have this default should be switched not to have one. This is obviously going to involve some backward compatibility issues, so the initial steps should be to add compatibility warnings to these types when the default values are used, and then at some point in the future we actually make the change. ---------------------------------------- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://reductivelabs.com/redmine/my/account --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en -~----------~----~----~----~------~----~------~--~---
