add ensure and alias parameters to modules_file compatiblity resource and use undef keywork for alias
This commit is contained in:
parent
bd774cd232
commit
e45a5794e7
1 changed files with 13 additions and 8 deletions
|
@ -14,7 +14,7 @@
|
|||
define module_file (
|
||||
$source,
|
||||
$ensure = present,
|
||||
$alias = 'absent',
|
||||
$alias = undef,
|
||||
$mode = 0644, $owner = root, $group = 0
|
||||
)
|
||||
{
|
||||
|
@ -23,18 +23,23 @@ define module_file (
|
|||
"${common::moduledir::module_dir_path}/${name}":
|
||||
source => $source,
|
||||
ensure => $ensure,
|
||||
alias => $alias,
|
||||
mode => $mode, owner => $owner, group => $group;
|
||||
}
|
||||
|
||||
if ($alias != 'absent') {
|
||||
File["${common::moduledir::module_dir_path}/${name}"] { alias => $alias }
|
||||
}
|
||||
}
|
||||
|
||||
# alias for compatibility
|
||||
define modules_file (
|
||||
$source, $mode = 0644, $owner = root, $group = 0
|
||||
)
|
||||
$source,
|
||||
$ensure = present,
|
||||
$alias = undef,
|
||||
$mode = 0644, $owner = root, $group = 0
|
||||
)
|
||||
{
|
||||
module_file { $name: source => $source, mode => $mode, owner => $owner, group => $group }
|
||||
module_file { $name:
|
||||
source => $source,
|
||||
ensure => $ensure,
|
||||
alias => $alias,
|
||||
mode => $mode, owner => $owner, group => $group
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue