- Description
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Quickly and easily setup NTP on all hosts on your network. Specify "masters" to synchronize with outside hosts, the remaining "slaves" will synchronize only against the "masters.
Setup NTP servers on ntp1.my.domain
and ntp2.my.domain
, they will use the
specified reference servers as well as peer with each other. All other hosts
will synchronize their clocks against ntp1.my.domain
and ntp2.my.domain
only.
class { '::ntp_master_slave':
masters => {
'ntp1.my.domain' => [ '0.pool.ntp.org', '1.pool.ntp.org' ],
'ntp2.my.domain' => [ '2.pool.ntp.org', '3.pool.ntp.org' ],
},
}
The same using hiera:
# common.yaml
---
classes:
- ntp_master_slave
ntp_master_slave::masters:
'ntp1.my.domain':
- 0.pool.ntp.org
- 1.pool.ntp.org
'ntp2.my.domain':
- 2.pool.ntp.org
- 3.pool.ntp.org
- master - Hash keyed by
$::hostname
,$::fqdn
, or any IP address on an interface to an array of reference NTP servers. (Hash[Stdlib::Host, Array[Stdlib::Host]]) - restrict -
::ntp::restrict
parameters. (Array[String]) - interfaces_ignore -
::ntp:interfaces_ignore
parameter. (Optional[Array[String]]) - this_hosts - Override the list of hostnames and IP addresses associated with this host. (Array[Stdlib::Host])
- Very few parameters from the
puppetlabs-ntp
module are accessible.
Check it out on github.com/bodhidigital/puppet-ntp_master_slave.