Commit 38d1da77 authored by Jonathan Gazeley's avatar Jonathan Gazeley
Browse files

Allow customisable prefix for attribute filters

parent a99e40ea
......@@ -148,14 +148,21 @@ Whether the control socket should be read-only or read-write. Choose from `ro`,
#### `freeradius::attr`
Install arbitrary attribute filters from a flat file. These are installed in an appropriate module config directory.
The contents of the `attr_filter` module are automatically updated to reference the filters.
##### `key`
Specify a RADIUS attribute to be the key for this attribute filter. Enter only the string part of the name.
##### `prefix`
Specify the prefix for the attribute filter name before the dot, e.g. `filter.post_proxy`. This is usually set
to `filter` on FR2 and `attr_filter` on FR3. Default: `filter`.
```puppet
freeradius::attr { 'eduroamlocal':
key => 'User-Name',
prefix => 'attr_filter',
source => 'puppet:///modules/site_freeradius/eduroamlocal',
}
```
......
......@@ -3,6 +3,7 @@ define freeradius::attr (
$source,
$ensure = present,
$key = 'User-Name',
$prefix = 'filter',
) {
$fr_package = $::freeradius::params::fr_package
$fr_service = $::freeradius::params::fr_service
......
attr_filter filter.<%= @name %> {
attr_filter <%= @prefix %>.<%= @name %> {
key = %{<%= @key %>}
attrsfile = ${confdir}/attr.d/<%= @name %>
}
......
attr_filter attr_filter.<%= @name %> {
attr_filter <%= @prefix %>.<%= @name %> {
key = "%{<%= @key %>}"
filename = ${modconfdir}/${.:name}/<%= @name %>
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment