add esnure and alias paramaters to module_file
This commit is contained in:
parent
ca9b0fecd9
commit
d366f079d1
1 changed files with 10 additions and 3 deletions
|
@ -9,19 +9,26 @@
|
||||||
# source => "puppet://${server}/...",
|
# source => "puppet://${server}/...",
|
||||||
# mode => 644, # default
|
# mode => 644, # default
|
||||||
# owner => root, # default
|
# owner => root, # default
|
||||||
# group => 0, # default
|
# group => 0, # default
|
||||||
# }
|
# }
|
||||||
define module_file (
|
define module_file (
|
||||||
$source,
|
$source,
|
||||||
$mode = 0644, $owner = root, $group = 0
|
$ensure = present,
|
||||||
|
$alias = 'absent',
|
||||||
|
$mode = 0644, $owner = root, $group = 0
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
include common::moduledir
|
include common::moduledir
|
||||||
file {
|
file {
|
||||||
"${common::moduledir::module_dir_path}/${name}":
|
"${common::moduledir::module_dir_path}/${name}":
|
||||||
source => $source,
|
source => $source,
|
||||||
|
ensure => $ensure,
|
||||||
mode => $mode, owner => $owner, group => $group;
|
mode => $mode, owner => $owner, group => $group;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($alias != 'absent') {
|
||||||
|
File["${common::moduledir::module_dir_path}/${name}"] { alias => $alias }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# alias for compatibility
|
# alias for compatibility
|
||||||
|
|
Loading…
Reference in a new issue