Hi all, I've been thinking a lot about file recursion and why it's so darn complicated, and I think one reason is the recursion happening in the same resource type doing the managing. As a result, I've been thinking of moving the file recursion into a Fileset resource type.
Currently, the file type generates new file resources during recursion; this basic model would be the same, except that the fileset resource type would be generating files. This would also make file globbing essentially trivial. You currently can't do it, because the glob file itself shouldn't be managing anything, it should just generate resources that match the glob and thus match something. Since there's no such thing as an abstract file (i.e., one that doesn't do anything), this doesn't work. With the fileset, though, it would never do anything other than generate other resources. I almost think we could build a simple 'set' resource type that knew how to manage any kind of resource, and it would just generate other resources via a specific interface - probably a 'find' method on the class, I guess. I don't know if it makes more sense to have a single 'set' resource type, or a set type for each resource type (e.g., userset, fileset, etc.). Seems silly, and would require metaprogramming, but is the only real option until we get multiple primary keys. This 'set' type would replace the existing 'resources' resource type. Any comments? -- Now and then an innocent man is sent to the legislature. --Kin Hubbard --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to puppet-dev@googlegroups.com To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en -~----------~----~----~----~------~----~------~--~---