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': ...@@ -245,6 +245,12 @@ freeradius::module { 'buffered-sql':
} }
``` ```
```puppet
freeradius::module { 'buffered-sql':
content => template('some_template.erb)',
}
```
#### `freeradius::policy` #### `freeradius::policy`
Install a policy from a flat file. Install a policy from a flat file.
......
...@@ -121,7 +121,7 @@ class freeradius ( ...@@ -121,7 +121,7 @@ class freeradius (
name => $freeradius::fr_service, name => $freeradius::fr_service,
require => [Exec['radiusd-config-test'], File['radiusd.conf'], User[$freeradius::fr_user], Package[$freeradius::fr_package],], require => [Exec['radiusd-config-test'], File['radiusd.conf'], User[$freeradius::fr_user], Package[$freeradius::fr_package],],
enable => true, enable => true,
hasstatus => true, hasstatus => $freeradius::fr_service_has_status,
hasrestart => true, hasrestart => true,
} }
......
# Install FreeRADIUS modules # Install FreeRADIUS modules
define freeradius::module ( define freeradius::module (
$source, $source = undef,
$content = undef,
$ensure = present, $ensure = present,
) { ) {
$fr_package = $::freeradius::params::fr_package $fr_package = $::freeradius::params::fr_package
...@@ -14,6 +15,7 @@ define freeradius::module ( ...@@ -14,6 +15,7 @@ define freeradius::module (
owner => 'root', owner => 'root',
group => $fr_group, group => $fr_group,
source => $source, source => $source,
content => $content,
require => [Package[$fr_package], Group[$fr_group]], require => [Package[$fr_package], Group[$fr_group]],
notify => Service[$fr_service], notify => Service[$fr_service],
} }
......
...@@ -22,6 +22,13 @@ class freeradius::params { ...@@ -22,6 +22,13 @@ class freeradius::params {
default => 'radiusd', 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 # Default base path for FreeRADIUS configs
$fr_basepath = $::osfamily ? { $fr_basepath = $::osfamily ? {
'RedHat' => '/etc/raddb', '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