> I had this thought the other day, but more focused around the higher level > problem of dependency specification and consumption than Packages in > particular. Yeah, since that is something that is currently kind of difficult to implement properly. I'd welcome a proper way to do this.
> What if you made two functions: > > 1. declare_capability("foo") > This would essentially just create an empty resource, Capability[foo]. If > multiple modules tried to declare the same capability, it would error, just > like we do today with duplicate resources. > > 2. require_capability("foo") > This would just declare a requirement relationship to Capability[foo]. If > it couldn't find that resource, compilation would fail. > > > Wouldn't something like this solve the general problem? We don't really want > to just speak about packages, you generally want to be able to express > requirements like: > > * This module requires a working SSH server > * This module requires a MySQL database > > etc etc > > I've deliberately focused this on doing this with functions as the extension > point as I think it keeps us focused, even if we decide that in the future > this should be solved in the metadata layer of a module. Hmm, while I can see your point of using functions, I think a more "puppety" way of doing this would be to have require Capability['yadda'] vs capability{'yadda': ensure => present } We'd also need a way to test if a capability is being provided by the system as a whole. Ie, a mysql module needs to be able to check if it needs to include resources for a firewall, monitoring, etc. cheers, -- Walter Heck -- follow @walterheck on twitter to see what I'm up to! -- Check out my new startup: Server Monitoring as a Service @ http://tribily.com Follow @tribily on Twitter and/or 'Like' our Facebook page at http://www.facebook.com/tribily -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.