aboutsummaryrefslogtreecommitdiff
path: root/manifests/server/service.pp
blob: ef016c531c489c1b08f1854408c7b87949564b7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Class: dhcp::server::service
#
# Manage the DHCP server service
#
class dhcp::server::service {
  include ::dhcp::params

  validate_string($dhcp::params::srv_dhcpd)
  validate_re($dhcp::params::srv_dhcpd, '^\S+$')
  validate_string($dhcp::params::service_pattern)
  validate_re($dhcp::params::service_pattern, '^\S+$')

  service {'dhcpd':
    ensure  => running,
    name    => $dhcp::params::srv_dhcpd,
    enable  => true,
    pattern => $dhcp::params::service_pattern,
  }
}