summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorMikael Fridh <frimik@gmail.com>2013-02-23 01:17:54 +0100
committerMikael Fridh <mfridh@marinsoftware.com>2013-02-23 01:20:34 +0100
commit0569bb6388b35e79bee9142e832347272b4bfe16 (patch)
tree8446f02c618497b81957ab627c0c395617c36769 /manifests
parente1c8433552ce7044541843b019aa3069a45c10d1 (diff)
ntp: fixes #19418 - allow template override
This allows a template to be explicitly set.
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp12
1 files changed, 11 insertions, 1 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 543db63..08296b7 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -27,6 +27,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.
@@ -45,6 +48,7 @@ class ntp($servers='UNSET',
$ensure='running',
$enable=true,
$restrict=true,
+ $config_template=undef,
$autoupdate=false
) {
@@ -125,6 +129,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,
@@ -135,7 +145,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],
}