PeTeRSoN   :-)

PeTeRSoN :-)

petersonwsantos

5,164 downloads

4,893 latest version

5.0 quality score

Version information

  • 0.3.1 (latest)
  • 0.3.0
  • 0.2.0
  • 0.1.0
released Jul 3rd 2019
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
  • Debian
    ,
    RedHat
    ,
    CentOS
    ,
    Ubuntu

Start using this module

Documentation

petersonwsantos/ntp — version 0.3.1 Jul 3rd 2019

Build Status GitHub release GitHub issues

Puppet Module - NTP

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

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'