module-common/manifests/defines/module_file.pp
David Schmitt 53d0fde15f Major cleanup of the common module
* improve documentation on all defines
* rename modules_dir to module_dir and modules_file to module_file
* create $module_dir_path to achieve DRY-ness
* silence the lsb_release stuff
* improve concatenated_file to use an intermediate file, improving reliability
  and decoupling the updateing from notifying our peers.
* remove serveral functions that were moved to puppet proper:
  - sha1 => sha1
  - gsub,substitute,slash_escape => regsubst
2009-05-31 21:14:37 +02:00

24 lines
591 B
Puppet

# common/manifests/defines/module_file.pp -- use an already defined module_dir
# to store module specific files
#
# Copyright (C) 2007 David Schmitt <david@schmitt.edv-bus.at>
# See LICENSE for the full license granted to you.
# Usage:
# module_file { "module/file":
# source => "puppet://..",
# mode => 644, # default
# owner => root, # default
# group => root, # default
# }
define module_file (
$source,
$mode = 0644, $owner = root, $group = 0
)
{
file {
"${module_dir_path}/${name}":
source => $source,
mode => $mode, owner => $owner, group => $group;
}
}