diff options
author | Adrien Thebo <git@somethingsinistral.net> | 2013-03-08 09:19:59 -0800 |
---|---|---|
committer | Adrien Thebo <git@somethingsinistral.net> | 2013-03-08 09:19:59 -0800 |
commit | b1b3132f84d1628800e50a65f6c49bb998872acc (patch) | |
tree | 4e55fbfaa5407c1019418d9e3913718c65bd241d /manifests | |
parent | fd064cbdf39bf12794e4c6733b188a077a47a214 (diff) | |
parent | 9968350db2343272068601bf5709c2548bc73eb7 (diff) |
Merge pull request #47 from frimik/feature-19418-ntp-template
ntp: fixes #19418 - allow template override
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/init.pp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index 9b9c465..af1f8d5 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -28,6 +28,9 @@ # $enable = true # Automatically start ntp deamon on boot. # +# $template = '${module_name}/${config_tpl}' +# Override with your own explicit template. +# # Actions: # # Installs, configures, and manages the ntp service. @@ -46,6 +49,7 @@ class ntp($servers='UNSET', $ensure='running', $enable=true, $restrict=true, + $config_template=undef, $autoupdate=false ) { @@ -147,6 +151,12 @@ class ntp($servers='UNSET', } } + if ($config_template == undef) { + $template_real = "${module_name}/${config_tpl}" + } else { + $template_real = $config_template + } + package { 'ntp': ensure => $package_ensure, name => $pkg_name, @@ -157,7 +167,7 @@ class ntp($servers='UNSET', owner => 0, group => 0, mode => '0644', - content => template("${module_name}/${config_tpl}"), + content => template($template_real), require => Package[$pkg_name], } |