aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphaël Pinson <github+aem1eeshi1@raphink.net>2015-02-10 14:50:25 +0100
committerRaphaël Pinson <github+aem1eeshi1@raphink.net>2015-02-10 14:50:25 +0100
commit1810a5642959cf95a0db3318e938b595fef4f749 (patch)
tree97becdaa1019e974ec2e1173d7079ade99fcafa8
parent1b1a7e50c7aa4308c3117c5f909a50dedb09778e (diff)
parentb16aec203d3b25fd9f8c22de510ff146ec2b4c0f (diff)
downloadpuppet-dhcp-1810a5642959cf95a0db3318e938b595fef4f749.tar.gz
puppet-dhcp-1810a5642959cf95a0db3318e938b595fef4f749.tar.bz2
Merge pull request #9 from Yelp/log_facility
Allow the log facility to be configured
-rw-r--r--manifests/init.pp3
-rw-r--r--manifests/server.pp3
-rw-r--r--templates/dhcpd.conf.debian.erb2
3 files changed, 7 insertions, 1 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 9af496f..fe9219b 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -8,6 +8,7 @@
# (default: true)
# ['server_ddns_update'] - Set ddns_update on dhcp::server
# ['server_authoritative'] - Set authoritative on dhcp::server
+# ['server_log_facility'] - Set log level on dhcp::server
# ['server_opts'] - Set opts for dhcp::server
#
# Actions:
@@ -24,12 +25,14 @@ class dhcp (
$server = true,
$server_ddns_update = undef,
$server_authoritative = undef,
+ $server_log_facility = undef,
$server_opts = undef,
) {
if $server {
class { '::dhcp::server':
ddns_update => $server_ddns_update,
authoritative => $server_authoritative,
+ log_facility => $server_log_facility,
opts => $server_opts,
}
}
diff --git a/manifests/server.pp b/manifests/server.pp
index a44cfe1..d4bbc30 100644
--- a/manifests/server.pp
+++ b/manifests/server.pp
@@ -6,6 +6,8 @@
# ['ddns_update'] : ddns-update-style option (defaults to 'none')
# ['authoritative'] : a boolean setting whether the DHCP server is
# authoritative (defaults to false)
+# ['log_facility'] : string containing syslog log levels
+# (defaults to local7)
# ['opts'] : an array of DHCPD valid options
#
# Sample usage:
@@ -36,6 +38,7 @@
class dhcp::server (
$ddns_update = 'none',
$authoritative = false,
+ $log_facility = 'local7',
$opts = [],
) {
class { '::dhcp::server::packages': } ->
diff --git a/templates/dhcpd.conf.debian.erb b/templates/dhcpd.conf.debian.erb
index 7dfd168..e2f31e3 100644
--- a/templates/dhcpd.conf.debian.erb
+++ b/templates/dhcpd.conf.debian.erb
@@ -16,5 +16,5 @@ ddns-update-style <%= @ddns_update %>;
# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
-log-facility local7;
+log-facility <%= @log_facility %>;