Defined Type: freeradius::client

Defined in:
manifests/client.pp

Summary

A short summary of the purpose of this defined type.

Overview

A description of what this defined type does

Examples:

freeradius::client { 'box':
  attributes => {
    ipaddr => '2001:db8::/64',
    secret => 'changeme',
  }
}

Parameters:



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'manifests/client.pp', line 17

define freeradius::client (
  String $client = $title,
  Hash[String, String] $attributes = {},
) {

  $config_dir = lookup('freeradius::config_dir')
  $target = "${config_dir}/clients.conf"

  $client_template = @(CLIENT)
  <% | String $client, Hash[String, String] $attributes | -%>
  client <%= $client %> {
    <%- $attributes.each |$key, $value| { -%>
      <%= $key %> = <%= $value %>
    <%- } -%>
  }
  | CLIENT

  concat::fragment { $client:
    target  => $target,
    content => inline_epp($client_template, {'client' => $client, 'attributes' => $attributes}),
  }

}