ntp

supported
pdk
Installs, configures, and manages the NTP service.

Puppet

puppetlabs

73,878,220 downloads

13,149 latest version

5.0 quality score

Version information

  • 8.5.0 (latest)
  • 8.4.0
  • 8.3.0
  • 8.2.0
  • 8.1.0
  • 8.0.0
  • 7.4.0
  • 7.3.0
  • 7.2.0
  • 7.1.1
  • 7.1.0
  • 7.0.0
  • 6.4.1
  • 6.4.0
  • 6.3.0
  • 6.2.0
  • 6.1.0
  • 6.0.0
  • 5.0.0
  • 4.2.0
  • 4.1.2
  • 4.1.1
  • 4.1.0
  • 4.0.0
  • 3.3.0
  • 3.2.1
  • 3.2.0
  • 3.1.2
  • 3.1.1
  • 3.1.0
  • 3.0.4
  • 3.0.3
  • 3.0.2
  • 3.0.1
  • 3.0.0-rc1
  • 3.0.0
  • 2.0.1
  • 2.0.0-rc1
  • 2.0.0
  • 1.0.1
  • 1.0.0-rc1
  • 1.0.0
  • 0.3.0
  • 0.2.0
  • 0.1.0
  • 0.0.4
  • 0.0.3
released Dec 17th 2020
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
  • Puppet >= 5.5.10 < 8.0.0
  • RedHat
    ,
    CentOS
    ,
    OracleLinux
    ,
    Scientific
    ,
    SLES
    ,
    Debian
    ,
    Ubuntu
    ,
    Solaris
    ,
    AIX

Start using this module

Documentation

puppetlabs/ntp — version 8.5.0 Dec 17th 2020

Reference

Table of Contents

Classes

Public Classes

Private Classes

  • ntp::config: This class handles the configuration file.
  • ntp::install: This class handles ntp packages.
  • ntp::service: This class handles the ntp service.

Data types

Classes

ntp

The ntp class.

Parameters

The following parameters are available in the ntp class.

logfile_mode

Data type: String

Specifies the permission for the NTP log file. Default is 0664.

logconfig

Data type: Optional[String]

Specifies the logconfig for NTP to use. Default value: ' '.

minpoll

Data type: Optional[Ntp::Poll_interval]

Sets Puppet to non-standard minimal poll interval of upstream servers. Values: 3 to 16. Default: undef.

maxpoll

Data type: Optional[Ntp::Poll_interval]

Sets use non-standard maximal poll interval of upstream servers. Values: 3 to 16. Default option: undef, except on FreeBSD (on FreeBSD, defaults to 9).

ntpsigndsocket

Data type: Optional[Stdlib::Absolutepath]

Sets NTP to sign packets using the socket in the ntpsigndsocket path. Requires NTP to be configured to sign sockets. Value: Path to the socket directory; for example, for Samba: usr/local/samba/var/lib/ntp_signd/. Default value: undef.

package_ensure

Data type: String

Whether to install the NTP package, and what version to install. Values: 'present', 'latest', or a specific version number. Default value: 'present'.

package_manage

Data type: Boolean

Whether to manage the NTP package. Default value: true.

package_name

Data type: Array[String]

Specifies the NTP package to manage. Default value: ['ntp'] (except on AIX and Solaris).

panic

Data type: Optional[Integer[0]]

Whether NTP should "panic" in the event of a very large clock skew. Applies only if tinker option set to true or if your environment is in a virtual machine. Default value: 0 if environment is virtual, undef in all other cases.

peers

Data type: Array[String]

List of NTP servers with which to synchronise the local clock.

tos_orphan

Data type: Optional[Integer[1]]

Enables Orphan mode for peer group Value: Should be set to 2 more than the worst-case externally-reachable source's stratum.

pool

Data type: Optional[Array[String]]

List of NTP server pools with which to synchronise the local clock.

preferred_servers

Data type: Array[String]

Specifies one or more preferred peers. Puppet appends 'prefer' to each matching item in the servers array. Default value: [ ].

noselect_servers

Data type: Array[String]

Specifies one or more peers to not sync with. Puppet appends 'noselect' to each matching item in the servers array. Default value: [ ].

restrict

Data type: Array[String]

Specifies one or more restrict options for the NTP configuration. Puppet prefixes each item with 'restrict', so you need to list only the content of the restriction. Default value for most operating systems: '[default kod nomodify notrap nopeer noquery', '-6 default kod nomodify notrap nopeer noquery', '127.0.0.1', '-6 ::1']'. Default value for AIX systems: '['default nomodify notrap nopeer noquery', '127.0.0.1',]'.

servers

Data type: Array[String]

Specifies one or more servers to be used as NTP peers. Default value: varies by operating system.

service_enable

Data type: Boolean

Whether to enable the NTP service at boot. Default value: true.

service_ensure

Data type: Enum['running', 'stopped']

Whether the NTP service should be running. Default value: 'running'.

service_manage

Data type: Boolean

Whether to manage the NTP service. Default value: true.

service_name

Data type: String

The NTP service to manage. Default value: varies by operating system.

service_provider

Data type: Optional[String]

Which service provider to use for NTP. Default value: 'undef'.

service_hasstatus

Data type: Boolean

Whether service has a functional status command. Default value: true.

service_hasrestart

Data type: Boolean

Whether service has a restart command. Default value: true.

slewalways

Data type: Optional[Enum['yes','no']]

xntpd setting to disable stepping behavior and always slew the clock to handle adjustments. Only relevant for AIX. Default value: 'undef'. Allowed values: 'yes', 'no'

statistics

Data type: Optional[Array]

List of statistics to have NTP generate and keep. Default value: [ ].

statsdir

Data type: Optional[Stdlib::Absolutepath]

Location of the NTP statistics directory on the managed system. Default value: '/var/log/ntpstats'.

step_tickers_file

Data type: Optional[Stdlib::Absolutepath]

Location of the step tickers file on the managed system. Default value: varies by operating system.

step_tickers_epp

Data type: Optional[String]

Location of the step tickers EPP template file. Default value: varies by operating system. Validation error is thrown if both this and the step_tickers_template parameters are specified.

step_tickers_template

Data type: Optional[String]

Location of the step tickers ERB template file. Default value: varies by operating system. Validation error is thrown if both this and the step_tickers_epp parameter are specified.

stepout

Data type: Optional[Integer[0, 65535]]

Value for stepout if tinker value is true. Valid options: unsigned shortint digit. Default value: undef.

tos

Data type: Boolean

Whether to enable tos options. Default value: false.

tos_minclock

Data type: Optional[Integer[1]]

Specifies the minclock tos option. Default value: 3.

tos_maxclock

Data type: Optional[Integer[1]]

Specifies the maxclock tos option. Default value: 6.

tos_minsane

Data type: Optional[Integer[1]]

Specifies the minsane tos option. Default value: 1.

tos_floor

Data type: Optional[Integer[1]]

Specifies the floor tos option. Default value: 1.

tos_ceiling

Data type: Optional[Integer[1]]

Specifies the ceiling tos option. Default value: 15.

tos_cohort

Data type: Variant[Boolean, Integer[0,1]]

Specifies the cohort tos option. Valid options: 0 or 1. Default value: 0.

tinker

Data type: Optional[Boolean]

Whether to enable tinker options. Default value: false.

udlc

Data type: Boolean

Specifies whether to configure NTP to use the undisciplined local clock as a time source. Default value: false.

udlc_stratum

Data type: Optional[Integer[1,15]]

Specifies the stratum the server should operate at when using the undisciplined local clock as the time source. This value should be set to no less than 10 if ntpd might be accessible outside your immediate, controlled network. Default value: 10.am udlc

user

Data type: Optional[String]

Specifies user to run ntpd daemon. Default value: ntp. Usually set by default on Centos7 (/etc/systemd/system/multi-user.target.wants/ntpd.service) and ubuntu 18.04 (/usr/lib/ntp/ntp-systemd-wrapper) This is currently restricted to Redhat based systems of version 7 and above and Ubuntu 18.04.

broadcastclient

Data type: Boolean

burst

Data type: Boolean

config

Data type: Stdlib::Absolutepath

config_dir

Data type: Optional[Stdlib::Absolutepath]

config_file_mode

Data type: String

config_epp

Data type: Optional[String]

config_template

Data type: Optional[String]

disable_auth

Data type: Boolean

disable_dhclient

Data type: Boolean

disable_kernel

Data type: Boolean

disable_monitor

Data type: Boolean

enable_mode7

Data type: Boolean

fudge

Data type: Optional[Array[String]]

driftfile

Data type: Stdlib::Absolutepath

leapfile

Data type: Optional[Stdlib::Absolutepath]

logfile

Data type: Optional[Stdlib::Absolutepath]

iburst_enable

Data type: Boolean

keys

Data type: Array[String]

keys_enable

Data type: Boolean

keys_file

Data type: Stdlib::Absolutepath

keys_controlkey

Data type: Optional[Ntp::Key_id]

keys_requestkey

Data type: Optional[Ntp::Key_id]

keys_trusted

Data type: Optional[Array[Ntp::Key_id]]

interfaces

Data type: Array[String]

interfaces_ignore

Data type: Array[String]

authprov

Data type: Optional[String]

daemon_extra_opts

Data type: Optional[String]

Data types

Ntp::Key_id

See http://doc.ntp.org/4.2.6/authopt.html#controlkey for documentation Alternatively: type Ntp::Key_id = Variant[Integer, Pattern['']]

Alias of Integer[1, 65534]

Ntp::Poll_interval

See http://doc.ntp.org/4.2.6/clockopt.html#server for documentation Alternatively: type Ntp::Poll_interval = Variant[Integer, Pattern['']]

Alias of Integer[4, 17]