By thomas, Fri, 05/22/2009 - 16:49
We'll define helpful functions here, since we defined this manifest first in site.pp, we can use any definitions in the subsequent manifests. We'll define a function called remotefile which defines a file to load from the puppet server
define remotefile($owner = root, $group= root, $mode, \
  $server = "", $cls="base", \
  $backup = false, $recurse = false) {
	file {
            mode => $mode,
            owner => $owner,
            group => $group,
            backup => $backup,
            source => "puppet://$server/$cls/$name"
puppet already has file defined, we have simply wrapped file in a function that sets some defaults for us.