Puppet Class: ntp::chrony

Defined in:
modules/ntp/manifests/chrony.pp

Overview

Set up an NTP time server based on Chrony. This is a simple setup which queries time data from an upstream NTP pool for dissemination in a local network

Parameters:

  • pool (Any)
  • permitted_networks (Any) (defaults to: [])


4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'modules/ntp/manifests/chrony.pp', line 4

class ntp::chrony($pool, $permitted_networks=[]) {

    # Can be dropped once all ISC ntpd instances have been removed
    package { 'ntp':
        ensure => purged,
        before => Package['chrony'],
    }

    package { 'chrony':
        ensure => present,
    }

    file { 'chrony.conf':
        mode    => '0644',
        owner   => 'root',
        group   => 'root',
        path    => '/etc/chrony/chrony.conf',
        content => template('ntp/chrony-conf.erb'),
    }

    service { 'chrony':
        ensure    => running,
        require   => File['chrony.conf'],
        subscribe => File['chrony.conf'],
    }
}