A significant portion of functions look something like this:
define remotefile(source, mode, owner) {
file { $name:
source => "puppet://puppet/module/$source",
mode => $mode,
owner => $owner,
}
}
Notice that it just wraps another type, adding a bit of information. It'd be great to have a simple language construct that supported this smoothly, so we didn't have to respecify every attribute supported by the object type (notice particularly that most attributes are *not* overridden). It seems almost like it should be a subclass of an existing type, using something akin to ruby's "super" function:
define remotefile(source) inherits file {
super {
source => "puppet://puppet/module/$source"
}
}
This provides the needed functionality and is relatively straightforward in concept.