aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@puppetmaster.black.co.at>2007-10-27 17:51:13 +0200
committerroot <root@puppetmaster.black.co.at>2007-10-27 17:51:13 +0200
commit79e25c055a9ad087e43d9963479f4d65ddb37357 (patch)
tree607a3a3149ac9607b8068d74c32ca9581d2bfd83
parent8b28bba3995b4afe29e51b43df6229abdf49eda3 (diff)
downloadpuppet-common-79e25c055a9ad087e43d9963479f4d65ddb37357.tar.gz
puppet-common-79e25c055a9ad087e43d9963479f4d65ddb37357.tar.bz2
common: modules_file define as companion to modules_dir
-rw-r--r--manifests/defines/modules_file.pp24
1 files changed, 24 insertions, 0 deletions
diff --git a/manifests/defines/modules_file.pp b/manifests/defines/modules_file.pp
new file mode 100644
index 0000000..6a37242
--- /dev/null
+++ b/manifests/defines/modules_file.pp
@@ -0,0 +1,24 @@
+# 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.
+
+# Usage:
+# modules_file { "module/file":
+# source => "puppet://..",
+# mode => 644, # default
+# owner => root, # default
+# group => root, # default
+# }
+define modules_file (
+ $source,
+ $mode = 0644, $owner = root, $group = root
+ )
+{
+ file {
+ "/var/lib/puppet/modules/${name}":
+ source => $source,
+ mode => $mode, owner => $owner, group => $group;
+ }
+}