summaryrefslogtreecommitdiff
path: root/manifests/init.pp
blob: 845bbb909ae3cec9d4f718524fd9e949f61f81d2 (plain)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Class: ntp
#
#   This module manages the ntp service.
#
#   Jeff McCune <jeff@puppetlabs.com>
#   2011-02-23
#
#   Tested platforms:
#    - Debian 6.0 Squeeze
#    - CentOS 5.4
#    - Amazon Linux 2011.09
#    - FreeBSD 9.0
#    - Archlinux
#
# Parameters:
#
#   $servers = [ '0.debian.pool.ntp.org iburst',
#                '1.debian.pool.ntp.org iburst',
#                '2.debian.pool.ntp.org iburst',
#                '3.debian.pool.ntp.org iburst', ]
#
#   $restrict = true
#     Whether to restrict ntp daemons from allowing others to use as a server.
#
#   $autoupdate = false
#     Whether to update the ntp package automatically or not.
#
#   $enable = true
#     Automatically start ntp deamon on boot.
#
#   $template = '${module_name}/${config_tpl}'
#     Override with your own explicit template.
#
# Actions:
#
#  Installs, configures, and manages the ntp service.
#
# Requires:
#
# Sample Usage:
#
#   class { "ntp":
#     servers    => [ 'time.apple.com' ],
#     autoupdate => false,
#   }
#
# [Remember: No empty lines between comments and class definition]
class ntp(
  $autoupdate      = $ntp::params::autoupdate,
  $config          = $ntp::params::config,
  $config_template = $ntp::params::config_template,
  $enable_service  = $ntp::params::enable_service,
  $ensure_service  = $ntp::params::ensure_service,
  $package_name    = $ntp::params::package_name,
  $restrict        = $ntp::params::restrict,
  $servers         = $ntp::params::servers,
  $service_name    = $ntp::params::service_name,
) inherits ntp::params {

  include '::ntp::install'
  include '::ntp::config'
  include '::ntp::service'

  Class['::ntp::install'] -> Class['::ntp::config'] ~> Class['::ntp::service']

}