aboutsummaryrefslogtreecommitdiff
path: root/manifests/server
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/server')
-rw-r--r--manifests/server/base.pp50
-rw-r--r--manifests/server/debian.pp26
2 files changed, 37 insertions, 39 deletions
diff --git a/manifests/server/base.pp b/manifests/server/base.pp
index 53cbd70..4e7d645 100644
--- a/manifests/server/base.pp
+++ b/manifests/server/base.pp
@@ -1,26 +1,24 @@
-/*
-
-= Class dhcp::server::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::server::$operatingsystem.
-
-*/
+# = Class dhcp::server::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::server::$operatingsystem.
+#
class dhcp::server::base {
include dhcp::params
include concat::setup
-
- package {"dhcp-server":
+
+ package {'dhcp-server':
ensure => present,
name => $dhcp::params::srv_dhcpd,
}
- service {"dhcpd":
- name => $dhcp::params::srv_dhcpd,
+ service {'dhcpd':
ensure => running,
+ name => $dhcp::params::srv_dhcpd,
enable => true,
- require => Package["dhcp-server"],
+ require => Package['dhcp-server'],
}
concat {"${dhcp::params::config_dir}/dhcpd.conf":
@@ -29,39 +27,39 @@ class dhcp::server::base {
mode => '0644',
}
- concat::fragment {"00.dhcp.server.base":
+ concat::fragment {'00.dhcp.server.base':
ensure => present,
target => "${dhcp::params::config_dir}/dhcpd.conf",
- require => Package["dhcp-server"],
- notify => Service["dhcpd"],
+ require => Package['dhcp-server'],
+ notify => Service['dhcpd'],
}
file {"${dhcp::params::config_dir}/dhcpd.conf.d":
- ensure => directory,
- mode => 0700,
+ ensure => directory,
+ mode => '0700',
recurse => true,
purge => true,
force => true,
- source => "puppet:///modules/dhcp/empty"
+ source => 'puppet:///modules/dhcp/empty'
}
file {"${dhcp::params::config_dir}/subnets":
- ensure => directory,
- require => Package["dhcp-server"],
- notify => Service["dhcpd"],
+ ensure => directory,
recurse => true,
purge => true,
force => true,
- source => "puppet:///modules/dhcp/empty"
+ source => 'puppet:///modules/dhcp/empty',
+ require => Package['dhcp-server'],
+ notify => Service['dhcpd'],
}
file {"${dhcp::params::config_dir}/hosts.d":
- ensure => directory,
- require => Package["dhcp-server"],
+ ensure => directory,
recurse => true,
purge => true,
force => true,
- source => "puppet:///modules/dhcp/empty"
+ source => 'puppet:///modules/dhcp/empty',
+ require => Package['dhcp-server'],
}
}
diff --git a/manifests/server/debian.pp b/manifests/server/debian.pp
index 3cc7508..5d23bbe 100644
--- a/manifests/server/debian.pp
+++ b/manifests/server/debian.pp
@@ -1,21 +1,21 @@
-/*
-
-= Class: dhcp::server::debian
-Installs a dhcp server on debian system.
-
-This class should not be included as is, please include "dhcp::server" instead.
-
-*/
+# = Class: dhcp::server::debian
+#
+# Installs a dhcp server on debian system.
+#
+# This class should not be included as is,
+# please include "dhcp::server" instead.
+#
class dhcp::server::debian inherits dhcp::server::base {
- Concat::Fragment["00.dhcp.server.base"] {
+ Concat::Fragment['00.dhcp.server.base'] {
content => template('dhcp/dhcpd.conf.debian.erb'),
}
- Service["dhcpd"] {
- pattern => $lsbdistcodename ? {
- squeeze => "/usr/sbin/dhcpd",
- lenny => "/usr/sbin/dhcpd3",
+ Service['dhcpd'] {
+ pattern => $::lsbdistcodename ? {
+ squeeze => '/usr/sbin/dhcpd',
+ lenny => '/usr/sbin/dhcpd3',
}
}
+
}