diff --git a/README.markdown b/README.markdown index 35ab7470..5912bfbb 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) diff --git a/manifests/init.pp b/manifests/init.pp index d2fca897..14adf595 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 80a35b45..c6b516a5 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 b2e42034..2393087f 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 -%>