Defined Type: ntp::daemon
- Defined in:
- modules/ntp/manifests/daemon.pp
Overview
SPDX-License-Identifier: Apache-2.0
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'modules/ntp/manifests/daemon.pp', line 2
define ntp::daemon(
Array[Stdlib::Host] $servers = [],
Array[Stdlib::Host] $pools = [],
Array[Stdlib::Host] $query_acl = [],
Array[String] $time_acl = [],
String $extra_config = '',
Wmflib::Ensure $ensure = lookup('ntp::daemon::ensure', {'default_value' => 'present'}),
){
# Debian bookworm and above use ntpsec and alias the ntp service but be
# explicit here so that we know what we are running in production.
ensure_packages(['ntpsec'])
file { 'ntpsec.conf':
mode => '0644',
path => '/etc/ntpsec/ntp.conf',
content => template('ntp/ntp-conf.erb'),
}
service { 'ntpsec':
ensure => stdlib::ensure($ensure, 'service'),
require => [ File['ntpsec.conf'], Package['ntpsec'] ],
}
}
|