Commit 115a3ed5 authored by Jonathan's avatar Jonathan
Browse files

Merge pull request #17 from diranged/add_proper_status_check

Add 'content' to freeradius::module, and fix status check
parents e053999e 9e6ad293
......@@ -245,6 +245,12 @@ freeradius::module { 'buffered-sql':
}
```
```puppet
freeradius::module { 'buffered-sql':
content => template('some_template.erb)',
}
```
#### `freeradius::policy`
Install a policy from a flat file.
......
......@@ -121,7 +121,7 @@ class freeradius (
name => $freeradius::fr_service,
require => [Exec['radiusd-config-test'], File['radiusd.conf'], User[$freeradius::fr_user], Package[$freeradius::fr_package],],
enable => true,
hasstatus => true,
hasstatus => $freeradius::fr_service_has_status,
hasrestart => true,
}
......
# Install FreeRADIUS modules
define freeradius::module (
$source,
$source = undef,
$content = undef,
$ensure = present,
) {
$fr_package = $::freeradius::params::fr_package
......@@ -14,6 +15,7 @@ define freeradius::module (
owner => 'root',
group => $fr_group,
source => $source,
content => $content,
require => [Package[$fr_package], Group[$fr_group]],
notify => Service[$fr_service],
}
......
......@@ -22,6 +22,13 @@ class freeradius::params {
default => 'radiusd',
}
# Whether the FreeRADIUS init.d startup script has a status setting or not
$fr_service_has_status = $::osfamily ? {
'RedHat' => true,
'Debian' => false,
default => false,
}
# Default base path for FreeRADIUS configs
$fr_basepath = $::osfamily ? {
'RedHat' => '/etc/raddb',
......
Supports Markdown
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