aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2010-05-10 09:36:34 -0400
committerMicah Anderson <micah@riseup.net>2010-09-02 18:28:14 -0400
commite45a5794e7fc36d601ac047ef879f2b16f88a333 (patch)
treeefd52e291ea3f299cc1c2dac338a9c9ed0c9a604 /manifests
parentbd774cd232b60a4c4048dbf604322ab78f1b7647 (diff)
downloadpuppet-common-e45a5794e7fc36d601ac047ef879f2b16f88a333.tar.gz
puppet-common-e45a5794e7fc36d601ac047ef879f2b16f88a333.tar.bz2
add ensure and alias parameters to modules_file compatiblity resource and use undef keywork for alias
Diffstat (limited to 'manifests')
-rw-r--r--manifests/defines/module_file.pp21
1 files changed, 13 insertions, 8 deletions
diff --git a/manifests/defines/module_file.pp b/manifests/defines/module_file.pp
index e80c1ed..1b18c29 100644
--- a/manifests/defines/module_file.pp
+++ b/manifests/defines/module_file.pp
@@ -14,7 +14,7 @@
define module_file (
$source,
$ensure = present,
- $alias = 'absent',
+ $alias = undef,
$mode = 0644, $owner = root, $group = 0
)
{
@@ -23,18 +23,23 @@ define module_file (
"${common::moduledir::module_dir_path}/${name}":
source => $source,
ensure => $ensure,
+ alias => $alias,
mode => $mode, owner => $owner, group => $group;
}
-
- if ($alias != 'absent') {
- File["${common::moduledir::module_dir_path}/${name}"] { alias => $alias }
- }
}
# alias for compatibility
define modules_file (
- $source, $mode = 0644, $owner = root, $group = 0
- )
+ $source,
+ $ensure = present,
+ $alias = undef,
+ $mode = 0644, $owner = root, $group = 0
+ )
{
- module_file { $name: source => $source, mode => $mode, owner => $owner, group => $group }
+ module_file { $name:
+ source => $source,
+ ensure => $ensure,
+ alias => $alias,
+ mode => $mode, owner => $owner, group => $group
+ }
}