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
67
68
|
# File 'manifests/params.pp', line 3
class dhcp::params {
case $facts['os']['family'] {
'Debian': {
if ( $facts['os']['name'] == 'Ubuntu' ) {
if (versioncmp($facts['os']['release']['full'], '12.04') >= 0) {
$dhcp_dir = '/etc/dhcp'
} else {
$dhcp_dir = '/etc/dhcp3'
}
} else {
$dhcp_dir = '/etc/dhcp'
}
$packagename = 'isc-dhcp-server'
$servicename = 'isc-dhcp-server'
$package_provider = undef
$dhcpd_binary = undef
}
'Darwin': {
$dhcp_dir = '/opt/local/etc/dhcp'
$packagename = 'dhcp'
$servicename = 'org.macports.dhcpd'
$package_provider = 'macports'
$dhcpd_binary = undef
}
'FreeBSD': {
$dhcp_dir = '/usr/local/etc'
$packagename = 'net/isc-dhcp44-server'
$servicename = 'isc-dhcpd'
$package_provider = undef
$dhcpd_binary = undef
}
'RedHat': {
$dhcp_dir = '/etc/dhcp'
if Integer.new($facts['os']['release']['major']) >= 8 {
$packagename = 'dhcp-server'
} else {
$packagename = 'dhcp'
}
$servicename = 'dhcpd'
$package_provider = undef
$dhcpd_binary = '/usr/sbin/dhcpd'
}
'Archlinux': {
$dhcp_dir = '/etc'
$packagename = 'dhcp'
# we currently do not manage the dhcpd6 config
#$servicename = ['dhcpd4.service', 'dhcpd6.service']
$servicename = ['dhcpd4.service']
$package_provider = 'pacman'
$dhcpd_binary = '/usr/bin/dhcpd'
}
'Solaris': {
if ( $facts['os']['name'] != 'SmartOS' ) {
fail('Only SmartOS variant of Solaris is supported.')
}
$dhcp_dir = '/opt/local/etc/dhcp'
$packagename = 'isc-dhcpd'
$servicename = 'isc-dhcpd'
$package_provider = undef
$dhcpd_binary = undef
}
default: {
fail('dhcp is supported on the following OS\'s: Debian, Ubuntu, Darwin, FreeBSD, RedHat, Fedora, and CentOS.')
}
}
}
|