Puppet module to manage the NTP service
Clone or download
pmcmaw Merge pull request #490 from puppetlabs/pdksync_pdksync_heads/master-…
…0-gabccfb1

pdksync - pdksync_heads/master-0-gabccfb1
Latest commit 24f67be Nov 7, 2018
Permalink
Failed to load latest commit information.
data Add burst param Aug 2, 2018
examples Move "tests" to examples, where they belong Jun 27, 2016
locales (maint) modulesync 892c4cf Sep 18, 2017
manifests Add burst param Aug 2, 2018
readmes Updating translations for readmes/README_ja_JP.md Jan 29, 2018
spec pdksync_heads/master-0-gabccfb1 Nov 7, 2018
templates Add burst param Aug 2, 2018
types (FM-5361) Update the allowed parameter types for the ntp class Oct 14, 2016
.fixtures.yml (MODULES-7851) - Adding augeas_core to fixtures for puppet 6 unit tests Sep 25, 2018
.gitattributes [MODULES-4528] Replace Puppet.version.to_f version comparison from sp… Mar 22, 2017
.gitignore (maint) - PDK 1.5.0 Update Jun 15, 2018
.pdkignore (maint) - PDK 1.5.0 Update Jun 15, 2018
.project (MODULES-4098) Sync the rest of the files Jan 20, 2017
.rspec (FM-4049) Update to current msync configs [2c99161] Jan 27, 2016
.rubocop.yml (FM-7392) - Puppet 6 Testing Changes Sep 25, 2018
.rubocop_todo.yml MODULES-5690: Implementing Rubocop in the module Oct 17, 2017
.sync.yml (MODULES-7658) use beaker3 in puppet-module-gems Aug 21, 2018
.travis.yml (FM-7392) - Puppet 6 Testing Changes Sep 25, 2018
.yardopts pdksync_heads/master-0-g34e3266 May 18, 2018
CHANGELOG.md (MODULES-7913) - 7.3.0 Release Prep Sep 27, 2018
CONTRIBUTING.md (maint) modulesync 892c4cf Sep 18, 2017
Gemfile (FM-7392) - Puppet 6 Testing Changes Sep 25, 2018
HISTORY.md (maint) update CHANGELOG using GCG Jul 3, 2018
LICENSE (FM-4046) Update to current msync configs [006831f] Feb 16, 2016
MAINTAINERS.md (MODULES-4098) Sync the rest of the files Jan 20, 2017
NOTICE (maint) modulesync 65530a4 Update Travis Jan 3, 2018
README.md Fix forge link to reference.md Oct 3, 2018
REFERENCE.md (maint) update REFERENCE.md with current puppet-strings Jul 3, 2018
Rakefile Update to pdk-templates master-0-gc87eee3, enable github-changelog-ge… Jul 3, 2018
hiera.yaml Avoid collision between OS and OS family name. Jan 22, 2018
metadata.json pdksync_heads/master-0-gabccfb1 Nov 7, 2018

README.md

ntp

Table of Contents

  1. Module Description - What the module does and why it is useful
  2. Setup - The basics of getting started with ntp
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module

Module description

The ntp module installs, configures, and manages the NTP service across a range of operating systems and distributions.

Setup

Beginning with ntp

include ntp is enough to get you up and running. To pass in parameters specifying which servers to use:

class { 'ntp':
  servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ],
}

Usage

All parameters for the ntp module are contained within the main ntp class, so for any function of the module, set the options you want. See the common usages below for examples.

Install and enable NTP

include ntp

Change NTP servers

class { 'ntp':
  servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ],
}

Restrict who can connect

class { 'ntp':
  servers  => [ 'ntp1.corp.com', 'ntp2.corp.com' ],
  restrict => ['127.0.0.1'],
}

Install a client that can't be queried

class { 'ntp':
  servers   => ['ntp1.corp.com', 'ntp2.corp.com'],
  restrict  => [
    'default ignore',
    '-6 default ignore',
    '127.0.0.1',
    '-6 ::1',
    'ntp1.corp.com nomodify notrap nopeer noquery',
    'ntp2.corp.com nomodify notrap nopeer noquery'
  ],
}

Listen on specific interfaces

Restricting NTP to a specific interface is especially useful on Openstack node, which may have numerous virtual interfaces.

class { 'ntp':
  servers  => [ 'ntp1.corp.com', 'ntp2.corp.com' ],
  interfaces => ['127.0.0.1', '1.2.3.4']
}

Opt out of Puppet controlling the service

class { 'ntp':
  servers        => [ 'ntp1.corp.com', 'ntp2.corp.com' ],
  restrict       => ['127.0.0.1'],
  service_manage => false,
}

Configure and run ntp without installing

class { 'ntp':
  package_manage => false,
}

Pass in a custom template

class { 'ntp':
  servers         => [ 'ntp1.corp.com', 'ntp2.corp.com' ],
  restrict        => ['127.0.0.1'],
  service_manage  => false,
  config_epp      => 'different/module/custom.template.epp',
}

Connect to an NTP server with the burst option enabled

class { 'ntp':
  servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ],
  burst  => true,
}

Reference

See REFERENCE.md

Limitations

This module has been tested on all PE-supported platforms. Additionally, it is tested (but not supported) on Solaris 10 and Fedora 20-22.

For an extensive list of supported operating systems, see metadata.json

Development

Puppet modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. Please follow our guidelines when contributing changes.

For more information, see our module contribution guide.

Contributors

To see who's already involved, see the list of contributors.