Skip to content
Snippets Groups Projects
Commit 30f31d58 authored by Jonathan Gazeley's avatar Jonathan Gazeley
Browse files

Add support for modular installs

parent 5542b194
No related branches found
No related tags found
No related merge requests found
...@@ -45,12 +45,21 @@ of the global settings to increase flexibility. Patches are welcome. ...@@ -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` * `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_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` * `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 ```puppet
class { 'freeradius': class { 'freeradius':
control_socket => true, control_socket => true,
max_requests => 4096, max_requests => 4096,
max_servers => 4096, max_servers => 4096,
mysql_support => true,
perl_support => true,
utils_support => true,
wpa_supplicant => true,
} }
``` ```
......
...@@ -3,6 +3,11 @@ class freeradius ( ...@@ -3,6 +3,11 @@ class freeradius (
$control_socket = false, $control_socket = false,
$max_servers = '4096', $max_servers = '4096',
$max_requests = '4096', $max_requests = '4096',
$mysql_support = false,
$perl_support = false,
$utils_support = false,
$ldap_support = false,
$wpa_supplicant = false,
) inherits freeradius::params { ) inherits freeradius::params {
include samba include samba
...@@ -75,22 +80,36 @@ class freeradius ( ...@@ -75,22 +80,36 @@ class freeradius (
order => 90, order => 90,
} }
# Install FreeRADIUS packages from ResNet repo, which is newer than stock CentOS # Install FreeRADIUS packages
package { 'freeradius': package { 'freeradius':
ensure => installed, ensure => installed,
name => $fr_package, name => $fr_package,
} }
if $mysql_support {
package { [ package { 'freeradius-mysql':
'freeradius-mysql',
'freeradius-perl',
'freeradius-utils',
]:
ensure => installed, 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': package { 'wpa_supplicant':
ensure => installed, 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 # 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 { ...@@ -8,6 +8,13 @@ class freeradius::params {
default => 'freeradius', default => 'freeradius',
} }
# Name of wpa_supplicant package
$fr_wpa_supplicant = $::osfamily ? {
'RedHat' => 'wpa_supplicant',
'Debian' => 'wpasupplicant',
default => 'wpa_supplicant',
}
# Name of FreeRADIUS service # Name of FreeRADIUS service
$fr_service = $::osfamily ? { $fr_service = $::osfamily ? {
'RedHat' => 'radiusd', 'RedHat' => 'radiusd',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment