From 5f2d844af55f828371bc3e5357edf178cd52805b Mon Sep 17 00:00:00 2001 From: Matt Callaway Date: Wed, 4 Dec 2013 10:38:09 -0600 Subject: [PATCH 1/2] Add fudge option --- manifests/init.pp | 2 ++ manifests/params.pp | 3 +++ templates/ntp.conf.erb | 3 +++ 3 files changed, 8 insertions(+) diff --git a/manifests/init.pp b/manifests/init.pp index d2fca8970..14adf5952 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -5,6 +5,7 @@ $config_template = $ntp::params::config_template, $disable_auth = $ntp::params::disable_auth, $disable_monitor = $ntp::params::disable_monitor, + $fudge = $ntp::params::fudge, $driftfile = $ntp::params::driftfile, $logfile = $ntp::params::logfile, $iburst_enable = $ntp::params::iburst_enable, @@ -48,6 +49,7 @@ validate_array($restrict) validate_array($interfaces) validate_array($servers) + validate_array($fudge) validate_bool($service_enable) validate_string($service_ensure) validate_bool($service_manage) diff --git a/manifests/params.pp b/manifests/params.pp index 80a35b45b..c6b516a5c 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -17,6 +17,9 @@ $disable_auth = false $broadcastclient = false + # Allow a list of fudge options + $fudge = [] + # On virtual machines allow large clock skews. # TODO Change this to str2bool($::is_virtual) when stdlib dependency is >= 4.0.0 # NOTE The "x${var}" is just to avoid lint quoted variable warning. diff --git a/templates/ntp.conf.erb b/templates/ntp.conf.erb index b2e42034b..2393087f1 100644 --- a/templates/ntp.conf.erb +++ b/templates/ntp.conf.erb @@ -67,3 +67,6 @@ controlkey <%= @keys_controlkey %> <% end -%> <% end -%> +<% [@fudge].flatten.each do |entry| -%> +fudge <%= entry %> +<% end -%> From ed2fa1e426ec2410d0af1e4d38c81b2c6d11b61d Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Wed, 25 Feb 2015 15:39:46 -0800 Subject: [PATCH 2/2] Add readme --- README.markdown | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.markdown b/README.markdown index 35ab74707..5912bfbb7 100644 --- a/README.markdown +++ b/README.markdown @@ -160,6 +160,10 @@ Tells Puppet whether to refrain from monitoring the NTP service. Valid options: Specifies an NTP driftfile. Valid options: string containing an absolute path. Default value: '/var/lib/ntp/drift' (except on AIX and Solaris) +#### `fudge` + +Used to provide additional information for individual clock drivers. Valid options: array containing strings that follow the `fudge` command. Default value: [ ] + ####`iburst_enable` Specifies whether to enable the iburst option for every NTP peer. Valid options: 'true' or 'false'. Default value: 'false' (except on AIX and Debian)