chrony

Manage chrony daemon on Linux

1,830,195 downloads

74,333 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

  • 0.3.2 (latest)
  • 0.3.1
  • 0.3.0
  • 0.2.6
  • 0.2.5
  • 0.2.4
  • 0.2.3
  • 0.2.2
  • 0.2.1
  • 0.2.0
  • 0.1.2
  • 0.1.1
  • 0.1.0
  • 0.0.9
  • 0.0.8
  • 0.0.7
  • 0.0.6
  • 0.0.5
  • 0.0.4
  • 0.0.3
  • 0.0.2
  • 0.0.1
released Jan 14th 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.8 < 7.0.0
  • , , , SLES, Archlinux
This module has been deprecated by its author since Oct 30th 2020.

The reason given was: This module has been migrated to Vox Pupuli

The author has suggested puppet-chrony as its replacement.

Start using this module

Documentation

aboe/chrony — version 0.3.2 Jan 14th 2020

Reference

Table of Contents

Classes

Public Classes

  • chrony: Installs and configures chrony

Private Classes

  • chrony::config: Configures chrony
  • chrony::install: Installs chrony
  • chrony::params: chrony class parameters
  • chrony::service: Manages the chrony service

Classes

chrony

Installs and configures chrony

Examples

Install chrony with default options
include chrony
Use specific servers
class { 'chrony':
  servers => [ 'ntp1.corp.com', 'ntp2.corp.com', ],
}
Ensure a secret password is used for chronyc
class { 'chrony':
  servers         => [ 'ntp1.corp.com', 'ntp2.corp.com', ],
  chrony_password => 'secret_password',
}
Use NTP authentication
class { 'chrony':
  keys            => [
    '25 SHA1 HEX:1dc764e0791b11fa67efc7ecbc4b0d73f68a070c',
  ],
  servers         => {
    'ntp1.corp.com' => ['key 25', 'iburst'],
    'ntp2.corp.com' => ['key 25', 'iburst'],
  },
}
Have chronyd autogenerate a command key at startup
class { 'chrony':
  chrony_password    => 'unset',
  config_keys_manage => false,
}
Allow some hosts
class { 'chrony':
  queryhosts => ['192.168/16'],
  port       => 123,
}
Configure the leap second mode
class { 'chrony':
  leapsecmode => 'slew',
  smoothtime  => '400 0.001 leaponly',
  maxslewrate => 1000.0
}
Configure makestep
# Step the system clock if the adjustment is larger than 1000 seconds, but only in the first ten clock updates.
class { 'chrony':
  makestep_seconds => 1000,
  makestep_updates => 10,
}

Parameters

The following parameters are available in the chrony class.

bindcmdaddress

Data type: Array[String]

Array of addresses of interfaces on which chronyd will listen for monitoring command packets (defaults to localhost).

Default value: $chrony::params::bindcmdaddress

cmdacl

Data type: Array[String]

An array of ACLs for monitoring access. This expects a list of directives, for example: ['cmdallow 1.2.3.4', 'cmddeny 1.2.3']. The order will be respected at the time of generating the configuration. The argument of the allow or deny commands can be an address, a partial address or a subnet (see manpage for more details).

Default value: $chrony::params::cmdacl

cmdport

Data type: Any

The cmdport directive allows the port that is used for run-time monitoring (via the chronyc program) to be altered from its default (323).

Default value: $chrony::params::cmdport

commandkey

Data type: Any

This sets the key ID used by chronyc to authenticate to chronyd.

Default value: $chrony::params::commandkey

chrony_password

Data type: Any

This sets the chrony password to be used in the key file. By default a short fixed string is used. If set explicitly to 'unset' then no password will be added to the keys file by puppet.

Default value: $chrony::params::chrony_password

config

Data type: Any

This sets the file to write chrony configuration into.

Default value: $chrony::params::config

config_template

Data type: Any

This determines which template puppet should use for the chrony configuration.

Default value: $chrony::params::config_template

config_keys

Data type: Any

This sets the file to write chrony keys into.

Default value: $chrony::params::config_keys

config_keys_template

Data type: Any

This determines which template puppet should use for the chrony key file.

Default value: $chrony::params::config_keys_template

config_keys_owner

Data type: Any

Specify unix owner of chrony keys file, defaults to 0.

Default value: $chrony::params::config_keys_owner

config_keys_group

Data type: Any

Specify unix group of chrony keys files, defaults to 0 on ArchLinux and chrony on Redhat.

Default value: $chrony::params::config_keys_group

config_keys_mode

Data type: Any

Specify unix mode of chrony keys files, defaults to 0644 on ArchLinux and 0640 on Redhat.

Default value: $chrony::params::config_keys_mode

keys

Data type: Any

An array of key lines. These are printed as-is into the chrony key file.

Default value: $chrony::params::keys

local_stratum

Data type: Any

Override the stratum of the server which will be reported to clients when the local reference is active. Defaults to 10.

Default value: $chrony::params::local_stratum

stratumweight

Data type: Optional[Numeric]

Sets how much distance should be added per stratum to the synchronisation distance when chronyd selects the synchronisation source from available sources. When not set, chronyd's default will be used, which since version 2.0 of chrony, is 0.001 seconds.

Default value: $chrony::params::stratumweight

log_options

Data type: Any

Specify which information is to be logged.

Default value: $chrony::params::log_options

package_ensure

Data type: Any

This can be set to 'present' or 'latest' or a specific version to choose the chrony package to be installed.

Default value: $chrony::params::package_ensure

package_name

Data type: Any

This determines the name of the package to install.

Default value: $chrony::params::package_name

peers

Data type: Any

This selects the servers to use for NTP peers (symmetric association). It is an array of servers.

Default value: $chrony::params::peers

servers

Data type: Any

This selects the servers to use for NTP servers. It can be an array of servers or a hash of servers to their respective options.

Default value: $chrony::params::servers

refclocks

Data type: Any

This should be a Hash of hardware reference clock drivers to use. They hash can either list a single list of options for the driver, or any array of multiple options if the same driver is used for multiple hardware clocks.

Example:

refclocks => { 'PPS' => [ '/dev/pps0 lock NMEA refid GPS',
                         '/dev/pps1:clear refid GPS2' ],
               'SHM' => '0 offset 0.5 delay 0.2 refid NMEA noselect' }

Default value: $chrony::params::refclocks

makestep_seconds

Data type: Numeric

Configures the makestep threshold. Normally chronyd will cause the system to gradually correct any time offset, by slowing down or speeding up the clock as required. If the adjustment is larger than makestep_seconds, chronyd will step the clock. Also see makestep_updates. (Defaults to 10).

Default value: $chrony::params::makestep_seconds

makestep_updates

Data type: Integer

Configures the makestep limit. Chronyd will step the time only if there have been no more than makestep_updates clock updates. Set to a negative value to disable the limit (useful for virtual machines and laptops that may get suspended for a prolonged time). Also see makestep_seconds. (Defaults to 3).

Default value: $chrony::params::makestep_updates

queryhosts

Data type: Any

This adds the networks, hosts that are allowed to query the daemon. Note that port needs to be set for this to work.

Default value: $chrony::params::queryhosts

port

Data type: Any

Port the service should listen on, to be used in combination with queryhosts. Module default is 0 to prevent accidental activation of server mode.

Default value: $chrony::params::port

service_enable

Data type: Any

This determines if the service should be enabled at boot.

Default value: $chrony::params::service_enable

service_ensure

Data type: Any

This determines if the service should be running or not.

Default value: $chrony::params::service_ensure

service_manage

Data type: Any

This selects if puppet should manage the service in the first place.

Default value: $chrony::params::service_manage

service_name

Data type: Any

This selects the name of the chrony service for puppet to manage.

Default value: $chrony::params::service_name

smoothtime

Data type: Optional[String]

Specify the smoothing of the time parameter as a string, for example smoothtime 50000 0.01.

Default value: $chrony::params::smoothtime

mailonchange

Data type: Any

Specify the mail you wanna alert when chronyd executes a sync grater than the threshold.

Default value: $chrony::params::mailonchange

threshold

Data type: Float

Specify the time limit for triggering events.

Default value: $chrony::params::threshold

lock_all

Data type: Boolean

Force chrony to only use RAM & prevent swapping.

Default value: $chrony::params::lock_all

leapsecmode

Data type: Optional[Enum['system', 'step', 'slew', 'ignore']]

Configures how to insert the leap second mode.

Default value: $chrony::params::leapsecmode

maxslewrate

Data type: Optional[Float]

Maximum rate for chronyd to slew the time. Only float type values possible, for example: maxslewrate 1000.0.

Default value: $chrony::params::maxslewrate

config_keys_manage

Data type: Any

Default value: $chrony::params::config_keys_manage

package_source

Data type: Optional[String]

Default value: $chrony::params::package_source

package_provider

Data type: Optional[String]

Default value: $chrony::params::package_provider

pools

Data type: Any

Default value: $chrony::params::pools

clientlog

Data type: Boolean

Default value: $chrony::params::clientlog

clientloglimit

Data type: Optional[Integer]

Default value: $chrony::params::clientloglimit