aboutsummaryrefslogtreecommitdiff
path: root/manifests/params.pp
blob: fc45987555258313ed66c6b60f89a1eae7ec6047 (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
# Class: dhcp::params
#
# Do NOT include this class - it won't do anything.
# Set variables for names and paths
#
class dhcp::params {

  case $::operatingsystem {

    /Debian|Ubuntu/: {
      $config_dir = $::lsbdistcodename? {
        /lenny|lucid/  => '/etc/dhcp3',
        /squeeze|wheezy|precise/ => '/etc/dhcp',
      }

      $srv_dhcpd = $::lsbdistcodename? {
        /lenny|lucid/            => 'dhcp3-server',
        /squeeze|wheezy|precise/ => 'isc-dhcp-server',
      }

      $service_pattern = $::lsbdistcodename? {
        /lenny|lucid/           => '/usr/sbin/dhcpd3',
        /squeeze|wheezy|precise/ => '/usr/sbin/dhcpd',
      }

      $server_template = "${module_name}/dhcpd.conf.debian.erb"
    }

    default: {
      fail "Unsupported OS ${::operatingsystem}/${::lsbdistcodename}"
    }

  }
}