remove extra slash
[puppet_common.git] / manifests / defines / modules_dir.pp
1 # common/manifests/defines/modules_dir.pp -- create a default directory
2 # for storing module specific information
3 #
4 # Copyright (C) 2007 David Schmitt <david@schmitt.edv-bus.at>
5 # See LICENSE for the full license granted to you.
6
7 # Usage:
8 # modules_dir { ["common", "common/dir1", "common/dir2" ]: }
9 define modules_dir (
10                 $mode = 0644, $owner = root, $group = 0
11         )
12 {
13         $dir = "/var/lib/puppet/modules/${name}"
14         if defined(File[$dir]) {
15                 debug("${dir} already defined")
16         } else {
17                 file {
18                         "/var/lib/puppet/modules/${name}":
19                                 source => [ "puppet://$server/modules/${name}/modules_dir", "puppet://$server/modules/common/empty"],
20                                 checksum => mtime,
21                                 # ignore the placeholder
22                                 ignore => '\.ignore', 
23                                 recurse => true, purge => true, force => true,
24                                 mode => $mode, owner => $owner, group => $group;
25                 }
26         }
27 }