Commit b7e06d00 authored by Mark Ottaway's avatar Mark Ottaway
Browse files

Final changes and updated Readme.md

parent 5416ed61
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
       * [`freeradius::module::eap`](#freeradiusmoduleeap)
       * [`freeradius::module::preprocess`](#freeradiusmodulepreprocess)
       * [`freeradius::module::huntgroup`](#freeradiusmodulehuntgroup)
       * [`freeradius::module::perl`](#freeradiusmoduleperl)
       * [`freeradius::policy`](#freeradiuspolicy)
       * [`freeradius::realm`](#freeradiusrealm)
       * [`freeradius::site`](#freeradiussite)
@@ -1214,6 +1215,33 @@ Order of this huntgroup in the huntgroup files. This is the `order` parameter fo
##### `huntgroup`
The path of the huntgroup file. Default: `huntgroup`.

#### `freeradius::module::perl`

Installs the Perl module [rlm_perl](https://wiki.freeradius.org/modules/rlm_perl) with more advanced configuration

```puppet
freeradius::module::perl { 'somename':
  perl_filename  => 'scriptname.pl',
  path           => "puppet:///modules/profiles/radius_proxy/",
  function_names => $function_names,
}
```
##### `perl_filename`
Filename of the Perl script.

##### `path`
The path of the source file on the Puppet server.

##### `function_names`
If different function names to default are used, or if seperate functions for accounting start and stop are used, just pass a hash of default and actual function names.
```puppet
$function_names = {
  "func_authenticate"     => "alternative_name",
  "func_start_accounting" => "start_function",
  "func_stop_accounting"  => "stop_function",
}
```

#### `freeradius::policy`

Install a policy from a flat file.
+6 −8
Original line number Diff line number Diff line
@@ -5,12 +5,10 @@
define freeradius::module::perl (
  $ensure                                        = file,
  String $moddir                                 = "${fr_moduleconfigpath}/perl",
  Optional[String] $key                                 = undef,
  Optional[String] $perl_filename                = undef,
  Optional[String] $path                         = undef,
  Optional[String] $content                      = undef,
  Optional[Hash[String, String]] $function_names = undef,
  Optional[Hash[String, String]] $split_accounting_names = undef,
) {
  $fr_moduleconfigpath = $::freeradius::params::fr_moduleconfigpath
  $fr_group            = $::freeradius::params::fr_group
+2 −2
Original line number Diff line number Diff line
@@ -61,8 +61,8 @@ perl {
	<% if defined?(@function_names) %>
	<% @function_names.each_pair do |default, function| %>
	<%=default%> = <%= function %>
    <% end %>
    <% end %>
    <% end -%>
    <% end -%>
	#func_authenticate = authenticate
	#func_authorize = authorize
	#func_preacct = preacct