aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2010-05-07 17:44:28 -0400
committerMicah Anderson <micah@riseup.net>2010-09-02 18:28:03 -0400
commitd366f079d170004674481d25753aed362d4ef609 (patch)
tree66cf63d5867f4294ff85601cdb619b1a579c6653
parentca9b0fecd989df4877163f718ada342d7ca8a26b (diff)
downloadpuppet-common-d366f079d170004674481d25753aed362d4ef609.tar.gz
puppet-common-d366f079d170004674481d25753aed362d4ef609.tar.bz2
add esnure and alias paramaters to module_file
-rw-r--r--manifests/defines/module_file.pp13
1 files changed, 10 insertions, 3 deletions
diff --git a/manifests/defines/module_file.pp b/manifests/defines/module_file.pp
index 6f84a32..e80c1ed 100644
--- a/manifests/defines/module_file.pp
+++ b/manifests/defines/module_file.pp
@@ -9,19 +9,26 @@
# source => "puppet://${server}/...",
# mode => 644, # default
# owner => root, # default
-# group => 0, # default
+# group => 0, # default
# }
define module_file (
- $source,
- $mode = 0644, $owner = root, $group = 0
+ $source,
+ $ensure = present,
+ $alias = 'absent',
+ $mode = 0644, $owner = root, $group = 0
)
{
include common::moduledir
file {
"${common::moduledir::module_dir_path}/${name}":
source => $source,
+ ensure => $ensure,
mode => $mode, owner => $owner, group => $group;
}
+
+ if ($alias != 'absent') {
+ File["${common::moduledir::module_dir_path}/${name}"] { alias => $alias }
+ }
}
# alias for compatibility