common: modules_file define as companion to modules_dir
This commit is contained in:
parent
8b28bba399
commit
79e25c055a
1 changed files with 24 additions and 0 deletions
24
manifests/defines/modules_file.pp
Normal file
24
manifests/defines/modules_file.pp
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue