add esnure and alias paramaters to module_file

This commit is contained in:
Jerome Charaoui 2010-05-07 17:44:28 -04:00 committed by Micah Anderson
parent ca9b0fecd9
commit d366f079d1

View file

@ -13,6 +13,8 @@
# } # }
define module_file ( define module_file (
$source, $source,
$ensure = present,
$alias = 'absent',
$mode = 0644, $owner = root, $group = 0 $mode = 0644, $owner = root, $group = 0
) )
{ {
@ -20,8 +22,13 @@ define module_file (
file { file {
"${common::moduledir::module_dir_path}/${name}": "${common::moduledir::module_dir_path}/${name}":
source => $source, source => $source,
ensure => $ensure,
mode => $mode, owner => $owner, group => $group; mode => $mode, owner => $owner, group => $group;
} }
if ($alias != 'absent') {
File["${common::moduledir::module_dir_path}/${name}"] { alias => $alias }
}
} }
# alias for compatibility # alias for compatibility