Version information
released Sep 7th 2017
This version is compatible with:
- Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >= 4.7.0 < 6.0.0
- , , ,
Start using this module
Add this module to your Puppetfile:
mod 'petersonwsantos-ntp', '0.3.1'
Learn more about managing modules with a PuppetfileDocumentation
petersonwsantos/ntp — version 0.3.1 Sep 7th 2017
Puppet Module - NTP
-
Project - Puppet Modules: https://www.pivotaltracker.com/n/projects/2081967
Description
The ntp module installs, configures, and manages the NTP service across a range of operating systems and distributions.
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
List of Stratum One Time Servers
class { '::ntp':
config_servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ],
}
Restrict who can connect
class { '::ntp':
config_servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ],
config_restrict => ['127.0.0.1'],
}
Install a client that can't be queried
class { '::ntp':
config_servers => ['ntp1.corp.com', 'ntp2.corp.com'],
config_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'
],
}
Reference
Classes
Public classes
- ntp: Main class, includes all other classes.
Private classes
- ntp::install: Handles the packages.
- ntp::config: Handles the configuration file.
- ntp::service: Handles the service.
Hiera example
---
ntp::package_ensure: present
ntp::package_manage: true
ntp::package_name:
- 'ntp'
ntp::service_name: ntpd
ntp::service_enable: true
ntp::service_ensure: running
ntp::service_manage: true
ntp::config_servers:
- '0.pool.ntp.org'
- '1.pool.ntp.org'
- '2.pool.ntp.org'
- '3.pool.ntp.org'
ntp::config_restrict:
- 'default nomodify notrap nopeer noquery kod limited'
- '-6 default kod nomodify notrap nopeer noquery'
- '127.0.0.1'
- '-6 ::1'
Dependencies
- puppetlabs/stdlib (>= 4.6.0 < 5.0.0)