From d25283b3e6a22f5d65e1abe4cf03669edd1580e7 Mon Sep 17 00:00:00 2001 From: Jason Lavoie <jason@oasys.net> Date: Thu, 15 Apr 2021 14:54:06 -0400 Subject: [PATCH] parameterize syslog_facility --- README.md | 3 +++ manifests/init.pp | 1 + templates/radiusd.conf.erb | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ed27010..0e91f94 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,9 @@ Add the radius user to the winbind privileged group. You must install winbind se ##### `log_destination` Configure destination of log messages. Valid values are `files`, `syslog`, `stdout` and `stderr`. Default: `files`. +##### `syslog_facility` +Configure which syslog facility to use when `log_destination` is set to `syslog`. Default: `daemon`. + ##### `syslog` Add a syslog rule (using the `saz/rsyslog` module). Default: `false`. diff --git a/manifests/init.pp b/manifests/init.pp index 6fd36d3..d172675 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -15,6 +15,7 @@ class freeradius ( Boolean $winbind_support = false, String $log_destination = 'files', Boolean $syslog = false, + String $syslog_facility = 'daemon', Freeradius::Boolean $log_auth = 'no', Boolean $preserve_mods = true, Boolean $correct_escapes = true, diff --git a/templates/radiusd.conf.erb b/templates/radiusd.conf.erb index 3e7823f..bd3a38a 100644 --- a/templates/radiusd.conf.erb +++ b/templates/radiusd.conf.erb @@ -327,7 +327,7 @@ log { # The exact values permitted here are OS-dependent. You probably # don't want to change this. # - syslog_facility = daemon + syslog_facility = <%= @syslog_facility %> # Log the full User-Name attribute, as it was found in the request. # -- GitLab