Forge Home


configure and manage ntpd


17,188 latest version

3.9 quality score

Version information

  • 0.7.3 (latest)
  • 0.7.2
  • 0.7.1
  • 0.7.0
  • 0.6.1
  • 0.6.0
  • 0.5.1
  • 0.5.0
released Sep 22nd 2013

Start using this module

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

Add this module to your Puppetfile:

mod 'erwbgy-ntp', '0.7.3'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add erwbgy-ntp
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install erwbgy-ntp --version 0.7.3

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.



erwbgy/ntp — version 0.7.3 Sep 22nd 2013


Puppet module for managing the Network Time Server daemon (ntpd) on a Linux host. Configuration can either be a list of time server hostnames to use or a country code/continent which results in appropriate time server hosts being used.

Currently only tested on Redhat-like systems.


servers: a list of time server hostnames

iburst: whether of not to enable the iburst option - default 'false'

country: the country code (eg. de for Germany or uk for United Kingdom)

continent: one of: europe, asia, oceania, north-america, south-america, africa

If servers is specified it takes precedence over country or continent. If only country and continent are specified then country takes precedence over continent.

If use_hiera or use_extlookup are specified then the other parameters are ignored. Hiera is checked before extlookup.

Puppet 3 Hiera configuration

Add an ntp::servers, ntp::country or ntp::continent variable to a hiera config file - for example in /etc/puppet/hieradata/common.yaml:

Add the ntp_servers variable with a list of time server hostnames (often internal hosts):


Or the ntp_country variable with a country code:

ntp::country: de

Or the ntp_continent variable with one of 'europe', 'asia', 'oceania', 'north-america', 'south-america', 'africa':

ntp::continent: africa


Use default time servers:

class { 'ntp': }

Specify a list of time servers to use:

class { 'ntp':
  servers => [ '', '' ],

Use time servers from a specific country, in this case the United Kingdom:

class { 'ntp':
  country => 'uk',

Use time servers from a specific continent, in this case Asia:

class { 'ntp':
  continent => 'asia',


See How do I use for details of the available NTP zones. NTP servers are not available for all countries - see the country list under each continent - so use a continent or the default pool if your country is not listed.


Tests are implemented using RSpec, rspec-puppet and puppetlabs_spec_helper. To run them you will first need to install puppetlabs_spec_helper and rspec-hiera-puppet:

# gem install puppetlabs_spec_helper rspec-hiera-puppet

Then switch to the module directory and run rake:

$ rake spec
/usr/bin/ruby -S rspec spec/classes/ntp_spec.rb --color

Finished in 1.02 seconds
12 examples, 0 failures


License: Apache License, Version 2.0

GitHub URL: