Puppet Class: freeradius::config::rsync

Defined in:
manifests/config/rsync.pp

Summary

Rsync the configurations files to `$freeradius::confdir`. It does not

Overview

remove any other files that exist in that directory

The defaults in this module use the freeradius share set up by the ‘simp-simp` module in the `simp::server::rsync_shares` manifest

Parameters

Parameters:

  • rsync_source (String) (defaults to: "freeradius_${facts['environment']}_${facts['os']['name']}/")

    The source on the rsync server

  • rsync_server (Simplib::Host) (defaults to: simplib::lookup('simp_options::rsync::server', { 'default_value' => '127.0.0.1'}))

    Default: 127.0.0.1 If $use_rsync_radiusd_conf is true, specify the rsync server from which to pull here.

  • radius_rsync_user (String) (defaults to: "freeradius_systems_${facts['environment']}_${facts['os']['name'].downcase}")

    Since radius holds sensitive information, the rsync space should be accordingly protected. This has been designed with the assuption that you will utilize the internal simplib::passgen mechanism to set the password. You can optionally specify $radius_rsync_password

  • radius_rsync_password (String) (defaults to: simplib::passgen($radius_rsync_user))

    If no password is specified, simplib::passgen will be used

  • rsync_timeout (Integer) (defaults to: simplib::lookup('simp_options::rsync::timeout', { 'default_value' => 2}))

    Default: ‘2’ If $use_rsync_radiusd_conf is true, specify the rsync connection timeout here.

  • rsync_bwlimit (Optional[Integer]) (defaults to: undef)

    rsync bandwidth limit



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'manifests/config/rsync.pp', line 33

class freeradius::config::rsync (
  String                  $rsync_source           = "freeradius_${facts['environment']}_${facts['os']['name']}/",
  Simplib::Host           $rsync_server           = simplib::lookup('simp_options::rsync::server', { 'default_value' => '127.0.0.1'}),
  String                  $radius_rsync_user      = "freeradius_systems_${facts['environment']}_${facts['os']['name'].downcase}",
  String                  $radius_rsync_password  = simplib::passgen($radius_rsync_user),
  Integer                 $rsync_timeout          = simplib::lookup('simp_options::rsync::timeout', { 'default_value' => 2}),
  Optional[Integer]       $rsync_bwlimit          = undef,
) {

  assert_private()

  include 'rsync'

  Class['freeradius::config']
  -> Class['freeradius::config::rsync']

  rsync { 'freeradius':
    source   => $rsync_source,
    target   => $freeradius::confdir,
    server   => $rsync_server,
    timeout  => $rsync_timeout,
    notify   => Service['radiusd'],
    bwlimit  => $rsync_bwlimit,
    user     => $radius_rsync_user,
    password => $radius_rsync_password
  }

  file { "${freeradius::confdir}/radiusd.conf":
    ensure  => 'file',
    owner   => 'root',
    group   => $freeradius::group,
    require => Rsync['freeradius'],
    mode    => '0640',
  }
}