diff options
Diffstat (limited to 'manifests/defines/module_file.pp')
-rw-r--r-- | manifests/defines/module_file.pp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/manifests/defines/module_file.pp b/manifests/defines/module_file.pp index e80c1ed..1b18c29 100644 --- a/manifests/defines/module_file.pp +++ b/manifests/defines/module_file.pp @@ -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 + } } |