Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
puppet-freeradius
Commits
35c1e759
Commit
35c1e759
authored
Jan 25, 2017
by
Jonathan
Committed by
GitHub
Jan 25, 2017
Browse files
Merge pull request #48 from amateo/feature/client
Add attributes parameter to freeradius::client
parents
37cdc1f0
0f0a6965
Changes
3
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
35c1e759
...
...
@@ -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`
...
...
manifests/client.pp
View file @
35c1e759
...
...
@@ -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
...
...
templates/client.conf.erb
View file @
35c1e759
...
...
@@ -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
-%>
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment