Defined Type: ntp::daemon

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

Overview

Parameters:

  • servers (Any) (defaults to: [])
  • pools (Any) (defaults to: [])
  • peers (Any) (defaults to: [])
  • query_acl (Any) (defaults to: [])
  • time_acl (Any) (defaults to: [])
  • extra_config (Any) (defaults to: '')
  • ensure (Any) (defaults to: hiera('ntp::daemon::ensure', 'present'))


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'modules/ntp/manifests/daemon.pp', line 1

define ntp::daemon($servers=[], $pools=[], $peers=[], $query_acl=[], $time_acl=[], $extra_config='',
    $ensure=hiera('ntp::daemon::ensure', 'present')) {
    package { 'ntp': ensure => present }

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

    service { 'ntp':
        ensure    => ensure_service($ensure),
        require   => [ File['ntp.conf'], Package['ntp'] ],
        subscribe => File['ntp.conf'],
    }
}