ntpd

manages NTP server and client

17,648 downloads

136 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 6.12.0 (latest)
  • 6.11.0
  • 6.10.0
  • 6.8.0
  • 6.7.0
  • 6.6.0
  • 6.5.2
  • 6.5.1
  • 6.5.0
  • 6.4.0
  • 6.3.1
  • 6.3.0
  • 6.2.1
  • 6.2.0
  • 6.1.1
  • 6.1.0
  • 6.0.3
  • 6.0.2
  • 6.0.1
  • 4.1.1
  • 4.1.0
released Jun 26th 2019
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x
  • Puppet >= 5.0.0 < 7.0.0
  • , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'simp-ntpd', '6.4.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add simp-ntpd
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install simp-ntpd --version 6.4.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: ntp, ntpd, simp

Documentation

simp/ntpd — version 6.4.0 Jun 26th 2019

Reference

Table of Contents

Classes

  • ntpd: Set up ntpd in either standalone or server mode
  • ntpd::ntpdate: Manage the setup of ntpdate

Defined types

  • ntpd::allow: Allow access to this server from a particular address or netmask

Classes

ntpd

Set up ntpd in either standalone or server mode

  • See also ntp.conf(5)

Parameters

The following parameters are available in the ntpd class.

ntpd_options

Data type: String[1]

Options for the ntp daemon, put into /etc/sysconfig/ntpd

servers

Data type: Ntpd::Servers

An array of servers or a Hash of server/option pairs providing details for the NTP servers that this system should synchronize with

  • Example

    servers => {
      'time.local.net' => ['iburst','minpoll 4', 'prefer'],
      # This one will just use $default_options
      'time.other.net' => []
    }
    

Default value: simplib::lookup('simp_options::ntpd::servers', { 'default_value' => {} })

stratum

Data type: Integer[0]

The stratum for this system

  • This only comes into play if no external servers are defined and the stratum has to be fudged

Default value: 2

logconfig

Data type: Array[String[1]]

A list of options for refining the system log output

Default value: ['=syncall','+clockall']

broadcastdelay

Data type: Numeric

Default calibration delay

Default value: 0.004

default_options

Data type: Array[String[1]]

The default options that will be added to all servers

  • Set to an empty array to disable

Default value: ['minpoll 4','maxpoll 4','iburst']

default_restrict

Data type: Array[Ntpd::Restrict]

The default IPv4 restrict options

Default value: ['kod', 'nomodify', 'notrap', 'nopeer', 'noquery']

default_restrict6

Data type: Array[Ntpd::Restrict]

The default IPv6 restrict options

Default value: $default_restrict

admin_hosts

Data type: Array[Simplib::IP::V4]

Hosts that are allowed unrestricted access via IPv4

Default value: ['127.0.0.1']

admin_hosts6

Data type: Array[Simplib::IP::V6]

Hosts that are allowed unrestricted access via IPv6

Default value: ['::1']

discard

Data type: Optional[Ntpd::Discard]

An optional has that can be used to set the average,minimum and monitor options for discard

Default value: undef

disable_monitor

Data type: Boolean

Disable the monitoring facility to prevent amplification attacks using ntpdc monlist command when default restrict does not include the noquery flag

  • See CVE-2013-5211 for details

Default value: true

manage_ntpdate

Data type: Boolean

Manage ntpdate settings

Default value: true

trusted_nets

Data type: Optional[Simplib::Netlist]

Setting this to an Array of networks/hostnames that you trust for communication will enable a default ntpd::alow entry so that remote systems can query this system for time.

Default value: undef

default_restrict_rules

Data type: Optional[Array[Ntpd::Restrict]]

Set to an Array of restrict rules of your choosing

  • Has no effect if $trusted_nets is not set

Default value: undef

firewall

Data type: Boolean

Enable management of the firewall in relation to inbound communication

  • Has no effect if $trusted_nets is not set

Default value: simplib::lookup('simp_options::firewall', { 'default_value' => false})

ntpdate_servers

Data type: Ntpd::Servers

NTP servers that are used in the ntpdate script at startup

Default value: $servers

ntpdate_sync_hwclock

Data type: Boolean

Set to true to sync hw clock after successful ntpdate. Set in /etc/sysconfig/ntpdate

Default value: true

ntpdate_retry

Data type: Integer[0]

Number of retries before giving up. Set in /etc/sysconfig/ntpdate

Default value: 2

ntpdate_options

Data type: Optional[String[1]]

Options for ntpdate. Set in /etc/sysconfig/ntpdate

Default value: undef

auditd

Data type: Boolean

Enable auditd monitoring of the ntp configuration files

  • This probably isn't needed in most cases since Puppet controls these files, but some systems require it

Default value: simplib::lookup('simp_options::auditd', { 'default_value' => false})

package_ensure

Data type: String

ensure parameter for the ntp package

Default value: simplib::lookup('simp_options::package_ensure', { 'default_value' => 'installed' })

extra_content

Data type: Optional[String[1]]

An unvalidated String that will be appended to the configuration file

Default value: undef

config_content

Data type: Optional[String[1]]

The entire content of the configuration file. ALL OTHER ntpd CONFIGURATION OPTIONS WILL BE IGNORED.

  • NOTE: Calls to ntpd::allow will still add restrict lines to the configuration.

Default value: undef

ntpd::ntpdate

Manage the setup of ntpdate

Defined types

ntpd::allow

Allow access to this server from a particular address or netmask

Parameters

The following parameters are available in the ntpd::allow defined type.

rules

Data type: Optional[Variant[ String[1],Array[Ntpd::Restrict] ]]

A standard ntpd.conf restrict rule (notrust, etc...)

Default value: undef

trusted_nets

Data type: Simplib::Netlist

Networks and Hosts to allow

Default value: simplib::lookup('simp_options::trusted_nets', { 'default_value' => ['127.0.0.1', '::1'] })

firewall

Data type: Boolean

If enabled, allow connections from trusted_nets

Default value: simplib::lookup('simp_options::firewall', { 'default_value' => false})