module-common/manifests/defines/module_file.pp
Micah Anderson 233229435f Merge remote-tracking branch 'sarava/master'
Conflicts:
	manifests/defines/line.pp
	manifests/defines/module_dir.pp
	manifests/defines/module_file.pp
	manifests/init.pp
2011-03-25 00:59:48 -04:00

47 lines
1.1 KiB
Puppet

# common/manifests/defines/modules_file.pp -- use a modules_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.
# Put a file into module-local storage.
#
# Usage:
# modules_file { "module/file":
# source => "puppet:///...",
# mode => 644, # default
# owner => root, # default
# group => 0, # default
# }
define module_file (
$source,
$ensure = present,
$m_alias = undef,
$mode = 0644, $owner = root, $group = 0
)
{
include common::moduledir
file {
"${common::moduledir::module_dir_path}/${name}":
source => $source,
ensure => $ensure,
alias => $m_alias,
mode => $mode, owner => $owner, group => $group;
}
}
# alias for compatibility
define modules_file (
$source,
$ensure = present,
$m_alias = undef,
$mode = 0644, $owner = root, $group = 0
)
{
module_file { $name:
source => $source,
ensure => $ensure,
alias => $m_alias,
mode => $mode, owner => $owner, group => $group
}
}