On May 28, 2010, at 12:46 PM, Markus Roberts wrote:

> Comments?

Yes.

A few thoughts I had on first read through: Is this a use case for hashes? Should it be a passthrough / override setup (so that the module write can provide defaults for values the user does not provide)? At what epistemological level is the data path determined?

I'm sure hashes could be used here, but you still need external data, regardless of the format.

Defaults should probably be shipped as a file in the module, IMO, but I could see other arguments. Other options might be specifying the defaults inline, but I would expect the defaults themselves to have branching, so I would expect to actually see multiple default files (e.g., one each for debian and red hat).

There are two ways to define data path: Where you look for data, and how you decide which data files to load. E.g., maybe you look for data in $confdir/data then $module/data, which is one kind of data path. Also, though, you might look for data in $os-$osversion.yaml then $os.yaml then $default.yaml.

The former should be an option in puppet.conf; the latter needs to be configurable per-class, unfortunately; maybe:

class foo loads_from(["$os-$osversion", "$os", "default"]) { }

Or something similar.

--
Man is ready to die for an idea, provided that idea is not quite
clear to him. --Paul Eldridge
---------------------------------------------------------------------
Luke Kanies  -|-   http://puppetlabs.com   -|-   +1(615)594-8199

--
You received this message because you are subscribed to the Google Groups "Puppet 
Developers" group.
To post to this group, send email to puppet-...@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.

Reply via email to