3ac7106d38
remote: warning: alias is a metaparam; this value will inherit to all contained resources When running puppet with --verbose
45 lines
1.1 KiB
Puppet
45 lines
1.1 KiB
Puppet
# 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 => 0, # default
|
|
# }
|
|
define module_file (
|
|
$source,
|
|
$ensure = present,
|
|
$m_alias = undef,
|
|
$mode = 0644, $owner = root, $group = 0
|
|
)
|
|
{
|
|
include common::moduledir
|
|
file {
|
|
"${common::moduledir::module_dir_path}/${name}":
|
|
source => $source,
|
|
ensure => $ensure,
|
|
alias => $m_alias,
|
|
mode => $mode, owner => $owner, group => $group;
|
|
}
|
|
}
|
|
|
|
# alias for compatibility
|
|
define modules_file (
|
|
$source,
|
|
$ensure = present,
|
|
$m_alias = undef,
|
|
$mode = 0644, $owner = root, $group = 0
|
|
)
|
|
{
|
|
module_file { $name:
|
|
source => $source,
|
|
ensure => $ensure,
|
|
alias => $m_alias,
|
|
mode => $mode, owner => $owner, group => $group
|
|
}
|
|
}
|