Commit 35c1e759 authored by Jonathan's avatar Jonathan Committed by GitHub
Browse files

Merge pull request #48 from amateo/feature/client

Add attributes parameter to freeradius::client
parents 37cdc1f0 0f0a6965
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -284,6 +284,9 @@ The UDP port that this virtual server should listen on. Leave blank if this clie
##### `firewall`
Create a firewall exception for this virtual server. If this is set to `true`, you must also supply `port` and either `ip` or `ip6`. Default: `false`.

##### `attributes`
Array of attributes to assign to this client. Default: empty.

#### `freeradius::config`

Install arbitrary config snippets from a flat file. These are installed in `/etc/raddb/conf.d`
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ define freeradius::client (
  $srcip          = undef,
  $firewall       = false,
  $ensure         = present,
  $attributes     = [],
) {
  $fr_package  = $::freeradius::params::fr_package
  $fr_service  = $::freeradius::params::fr_service
+11 −0
Original line number Diff line number Diff line
@@ -6,4 +6,15 @@ client <%= @shortname %> {
	<% if @virtual_server %>virtual_server = <%= @virtual_server %><% end %>
	<% if @nastype %>nas_type = <%= @nastype %><% end %>
	require_message_authenticator = no
  <%- if !@attributes.empty? -%>
    <%- if @attributes.respond_to?('join') -%>
  <%= @attributes.join("\n  ") %>
    <%- elsif @attributes.is_a?(Hash) -%>
      <%- @attributes.sort.each do |k, v| -%>
  <%= k %> = <%= v %>
      <%- end -%>
    <%- else -%>
  <%= @attributes %>
    <%- end -%>
  <%- end -%>
}