Commit 30f31d58 authored by Jonathan Gazeley's avatar Jonathan Gazeley
Browse files

Add support for modular installs

parent 5542b194
......@@ -45,12 +45,21 @@ of the global settings to increase flexibility. Patches are welcome.
* `control_socket` Enable the control-socket virtual server. See also the "radmin" program. Default: `false`
* `max_requests` The maximum number of requests which the server keeps track of. This should be 256 multiplied by the number of clients. Default: `4096`
* `max_servers` Limit on the total number of servers running. Default: `4096`
* `mysql_support` Install support for MySQL. Default: `false`
* `perl_support` Install support for Perl. Default: `false`
* `utils_support` Install FreeRADIUS utils. Default: `false`
* `ldap_support` Install support for LDAP. Default: `false`
* `wpa_supplicant`. Install wpa_supplicant utility. Default: `false`
```puppet
class { 'freeradius':
control_socket => true,
max_requests => 4096,
max_servers => 4096,
mysql_support => true,
perl_support => true,
utils_support => true,
wpa_supplicant => true,
}
```
......
......@@ -3,6 +3,11 @@ class freeradius (
$control_socket = false,
$max_servers = '4096',
$max_requests = '4096',
$mysql_support = false,
$perl_support = false,
$utils_support = false,
$ldap_support = false,
$wpa_supplicant = false,
) inherits freeradius::params {
include samba
......@@ -75,22 +80,36 @@ class freeradius (
order => 90,
}
# Install FreeRADIUS packages from ResNet repo, which is newer than stock CentOS
# Install FreeRADIUS packages
package { 'freeradius':
ensure => installed,
name => $fr_package,
}
package { [
'freeradius-mysql',
'freeradius-perl',
'freeradius-utils',
]:
ensure => installed,
if $mysql_support {
package { 'freeradius-mysql':
ensure => installed,
}
}
package { 'wpa_supplicant':
ensure => installed,
if $perl_support {
package { 'freeradius-perl':
ensure => installed,
}
}
if $utils_support {
package { 'freeradius-utils':
ensure => installed,
}
}
if $ldap_support {
package { 'freeradius-ldap':
ensure => installed,
}
}
if $wpa_supplicant {
package { 'wpa_supplicant':
ensure => installed,
name => $fr_wpa_supplicant,
}
}
# radiusd always tests its config before restarting the service, to avoid outage. If the config is not valid, the service
......
......@@ -8,6 +8,13 @@ class freeradius::params {
default => 'freeradius',
}
# Name of wpa_supplicant package
$fr_wpa_supplicant = $::osfamily ? {
'RedHat' => 'wpa_supplicant',
'Debian' => 'wpasupplicant',
default => 'wpa_supplicant',
}
# Name of FreeRADIUS service
$fr_service = $::osfamily ? {
'RedHat' => 'radiusd',
......
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