Commit e053999e authored by Jonathan's avatar Jonathan
Browse files

Merge pull request #16 from diranged/misc_improvements

Allow for 'content' to be passed into freeradius::config and freeradius::cert
parents cf6b9c5c 9f07dee6
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -148,6 +148,13 @@ freeradius::cert { 'mycert.pem':
}
```

```puppet
freeradius::cert { 'mycert.pem':
  content => '<your key/cert content here>',
  type    => 'key',
}
```

##### `type`

Set file permissions on the installed certificate differently depending on whether this is a private key or a public certificate. Note that the default is to treat the file as a private key and remove world-readable privileges. Allowable values: `cert`, `key`. Default: `key`.
@@ -204,6 +211,12 @@ freeradius::config { 'realm-checks.conf':
}
```

```puppet
freeradius::config { 'realm-checks.conf':
  content => template('your_template),
}
```

#### `freeradius::dictionary`

Install custom dictionaries without breaking the default FreeRADIUS dictionary. Custom dictionaries are installed in `/etc/raddb/dictionary.d` and automatically included in the global dictionary.
+11 −8
Original line number Diff line number Diff line
# Install FreeRADIUS certificates
define freeradius::cert (
  $source,
  $source = undef,
  $content = undef,
  $type = 'key',
  $ensure = present,
) {
@@ -21,6 +22,8 @@ define freeradius::cert (
    owner     => 'root',
    group     => $fr_group,
    source    => $source,
    content   => $content,
    show_diff => false,
    require   => [File["${fr_basepath}/certs"], Package[$fr_package], Group[$fr_group]],
    notify    => Service[$fr_service],
  }
+3 −1
Original line number Diff line number Diff line
# Install FreeRADIUS config snippets
define freeradius::config (
  $source,
  $source = undef,
  $content = undef,
  $ensure = present,
) {
  $fr_package  = $::freeradius::params::fr_package
@@ -14,6 +15,7 @@ define freeradius::config (
    owner   => 'root',
    group   => $fr_group,
    source  => $source,
    content => $content,
    require => [File["${fr_basepath}/conf.d"], Package[$fr_package], Group[$fr_group]],
    notify  => Service[$fr_service],
  }
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ raddbdir = ${sysconfdir}/raddb
radacctdir = ${logdir}/radacct

#  name of the running server.  See also the "-n" command-line option.
name = radiusd
name = <%= @fr_service %>

#  Location of config and logfiles.
confdir = ${raddbdir}