krb5.pp 1.03 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
# Configure Kerberos support for FreeRADIUS
define freeradius::krb5 (
  $keytab,
  $principal,
  $start       = '${thread[pool].start_servers}',
  $min         = '${thread[pool].min_spare_servers}',
  $max         = '${thread[pool].max_servers}',
  $spare       = '${thread[pool].max_spare_servers}',
  $ensure      = 'present',
) {
  $fr_package          = $::freeradius::params::fr_package
  $fr_service          = $::freeradius::params::fr_service
  $fr_modulepath       = $::freeradius::params::fr_modulepath
14
  $fr_basepath         = $::freeradius::params::fr_basepath
15
16
17
  $fr_group            = $::freeradius::params::fr_group

  # Generate a module config
18
  file { "${fr_basepath}/mods-available/${name}":
19
20
21
22
23
24
25
26
    ensure  => $ensure,
    mode    => '0640',
    owner   => 'root',
    group   => $fr_group,
    content => template('freeradius/krb5.erb'),
    require => [Package[$fr_package], Group[$fr_group]],
    notify  => Service[$fr_service],
  }
27
28
29
30
  file { "${fr_modulepath}/${name}":
    ensure => link,
    target => "../mods-available/${name}",
  }
31
}