aboutsummaryrefslogtreecommitdiff
path: root/manifests/classes/dhcp-server-base.pp
diff options
context:
space:
mode:
authorCédric Jeanneret <cedric.jeanneret@camptocamp.com>2010-11-05 08:32:53 +0100
committerCédric Jeanneret <cedric.jeanneret@camptocamp.com>2010-11-05 08:32:53 +0100
commit27a7dee0f65476c637755100bf18e0252b3534dc (patch)
tree208f20db2aa56591deb8325aeca6d802fe7536f4 /manifests/classes/dhcp-server-base.pp
parentbadb9fccf410426dcad5ffb460e2f8f102ac9490 (diff)
downloadpuppet-dhcp-27a7dee0f65476c637755100bf18e0252b3534dc.tar.gz
puppet-dhcp-27a7dee0f65476c637755100bf18e0252b3534dc.tar.bz2
(module dhcp) Renamed files to reflect usage
Diffstat (limited to 'manifests/classes/dhcp-server-base.pp')
-rw-r--r--manifests/classes/dhcp-server-base.pp51
1 files changed, 51 insertions, 0 deletions
diff --git a/manifests/classes/dhcp-server-base.pp b/manifests/classes/dhcp-server-base.pp
new file mode 100644
index 0000000..4e1497e
--- /dev/null
+++ b/manifests/classes/dhcp-server-base.pp
@@ -0,0 +1,51 @@
+/*
+
+= Class dhcp::base
+Do NOT include this class - it won't work at all.
+Set variables for package name and so on.
+This class should be inherited in dhcp::$operatingsystem.
+
+*/
+class dhcp::base {
+ include dhcp::variables
+ package {"dhcp-server":
+ ensure => present,
+ name => $dhcp::variables::srv_dhcpd,
+ }
+
+ service {"dhcpd":
+ name => $dhcp::variables::srv_dhcpd,
+ ensure => running,
+ enable => true,
+ require => Package["dhcp-server"],
+ }
+
+ common::concatfilepart {"00-base":
+ file => "${dhcp::variables::config_dir}/dhcpd.conf",
+ ensure => present,
+ require => Package["dhcp-server"],
+ notify => Service["dhcpd"],
+ }
+
+ file {"subnet-config-dir":
+ path => "${dhcp::variables::config_dir}/subnets",
+ ensure => directory,
+ require => Package["dhcp-server"],
+ notify => Service["dhcpd"],
+ recurse => true,
+ purge => true,
+ force => true,
+ source => "puppet:///dhcp/empty"
+ }
+
+ file {"dhcp-config-dir":
+ path => "${dhcp::variables::config_dir}/hosts.d",
+ ensure => directory,
+ require => Package["dhcp-server"],
+ recurse => true,
+ purge => true,
+ force => true,
+ source => "puppet:///dhcp/empty"
+ }
+
+}