Defined Type: ntp::daemon

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

Overview

Parameters:

  • servers (Array[Stdlib::Host]) (defaults to: [])
  • pools (Array[Stdlib::Host]) (defaults to: [])
  • peers (Array[Stdlib::Host]) (defaults to: [])
  • query_acl (Array[Stdlib::Host]) (defaults to: [])
  • time_acl (Array[String]) (defaults to: [])
  • extra_config (String) (defaults to: '')
  • ensure (Wmflib::Ensure) (defaults to: lookup('ntp::daemon::ensure', {'default_value' => 'present'}))


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

define ntp::daemon(
    Array[Stdlib::Host] $servers      = [],
    Array[Stdlib::Host] $pools        = [],
    Array[Stdlib::Host] $peers        = [],
    Array[Stdlib::Host] $query_acl    = [],
    Array[String]       $time_acl     = [],
    String              $extra_config = '',
    Wmflib::Ensure      $ensure       = lookup('ntp::daemon::ensure', {'default_value' => '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'],
    }
}