Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fudge option #246

Merged
merged 2 commits into from Feb 25, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.markdown
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions manifests/init.pp
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions manifests/params.pp
Expand Up @@ -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.
Expand Down
3 changes: 3 additions & 0 deletions templates/ntp.conf.erb
Expand Up @@ -67,3 +67,6 @@ controlkey <%= @keys_controlkey %>
<% end -%>

<% end -%>
<% [@fudge].flatten.each do |entry| -%>
fudge <%= entry %>
<% end -%>