-
Project - Puppet Modules: https://www.pivotaltracker.com/n/projects/2081967
The ntp module installs, configures, and manages the NTP service across a range of operating systems and distributions.
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.
include '::ntp'
List of Stratum One Time Servers
class { '::ntp':
config_servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ],
}
class { '::ntp':
config_servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ],
config_restrict => ['127.0.0.1'],
}
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'
],
}
- ntp: Main class, includes all other classes.
- ntp::install: Handles the packages.
- ntp::config: Handles the configuration file.
- ntp::service: Handles the service.
---
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'