summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
authorAshley Penney <ashley.penney@puppetlabs.com>2013-07-29 16:02:50 -0400
committerAshley Penney <ashley.penney@puppetlabs.com>2013-07-29 17:09:26 -0400
commit0235486d2d6de477bfa93487b03e6ca37cb2d24c (patch)
tree7a8e7e1efcf0ce72382182661b9e7c581d7b67fa /manifests/init.pp
parentc5408ae4b17bc3b395b13d10c9473e15661d2d38 (diff)
Add new parameters to allow more flexible configuration.
`driftfile` [String]: Allows the setting of the driftfile location. `keys_enable` [Boolean]: Should the ntp keys option be enabled? `keys_file` [String]: Where are the keys stored? `keys_trusted` [Array]: List of keys to trust. `keys_requestkey` [String]: Request key to use. `keys_controlkey` [String]: Control key to use. If keys_enable is set then the directory that keysfile is stored in is created (recursively). Currently we don't manage the keys file but that is an option to be added.
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp23
1 files changed, 23 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 61a5ad9..d406fb3 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -2,6 +2,12 @@ class ntp (
$autoupdate = $ntp::params::autoupdate,
$config = $ntp::params::config,
$config_template = $ntp::params::config_template,
+ $driftfile = $ntp::params::driftfile,
+ $keys_enable = $ntp::params::keys_enable,
+ $keys_file = $ntp::params::keys_file,
+ $keys_controlkey = $ntp::params::keys_controlkey,
+ $keys_requestkey = $ntp::params::keys_requestkey,
+ $keys_trusted = $ntp::params::keys_trusted,
$package_ensure = $ntp::params::package_ensure,
$package_name = $ntp::params::package_name,
$panic = $ntp::params::panic,
@@ -13,6 +19,23 @@ class ntp (
$service_name = $ntp::params::service_name,
) inherits ntp::params {
+ validate_absolute_path($config)
+ validate_string($config_template)
+ validate_absolute_path($driftfile)
+ validate_bool($keys_enable)
+ validate_re($keys_controlkey, ['^\d+$', ''])
+ validate_re($keys_requestkey, ['^\d+$', ''])
+ validate_array($keys_trusted)
+ validate_string($package_ensure)
+ validate_array($package_name)
+ validate_bool($panic)
+ validate_bool($restrict)
+ validate_array($servers)
+ validate_bool($service_enable)
+ validate_string($service_ensure)
+ validate_bool($service_manage)
+ validate_string($service_name)
+
if $autoupdate {
notice('autoupdate parameter has been deprecated and replaced with package_ensure. Set this to latest for the same behavior as autoupdate => true.')
}