Skip to content
This repository has been archived by the owner on Dec 17, 2022. It is now read-only.

Setup NTP on a LAN with only a some hosts reaching out of the network.

Notifications You must be signed in to change notification settings

bodhidigital/puppet-ntp_master_slave

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ntp_master_slave

Table of Contents

  1. Description
  2. Usage - Configuration options and additional functionality
  3. Reference - An under-the-hood peek at what the module is doing and how
  4. Limitations - OS compatibility, etc.
  5. Development - Guide for contributing to the module

Description

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.

Usage

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

Reference

Classes

ntp_master_slave
  • 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])

Limitations

  • Very few parameters from the puppetlabs-ntp module are accessible.

Development

Check it out on github.com/bodhidigital/puppet-ntp_master_slave.

About

Setup NTP on a LAN with only a some hosts reaching out of the network.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published