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
0a35f87a
Unverified
Commit
0a35f87a
authored
Mar 13, 2018
by
Jonathan
Committed by
GitHub
Mar 13, 2018
Browse files
Merge pull request #98 from amateo/feature/huntgroup
Fix huntgroups when there is more than one condition
parents
f0d20754
2f2345da
Changes
2
Hide whitespace changes
Inline
Side-by-side
manifests/huntgroup.pp
View file @
0a35f87a
...
...
@@ -8,13 +8,9 @@ define freeradius::huntgroup (
$fr_basepath
=
$::freeradius::params::fr_basepath
$fr_service
=
$::freeradius::params::fr_service
$conditionals
=
join
(
$conditions
,
', '
)
$content
=
"
${huntgroup}
\t
${conditionals}
\n
"
concat::fragment
{
"huntgroup.
${title}
"
:
target
=>
"
${fr_basepath}
/mods-config/preprocess/huntgroups"
,
content
=>
$content
,
content
=>
template
(
'freeradius/huntgroup.erb'
)
,
order
=>
$order
,
notify
=>
Service
[
$fr_service
],
}
...
...
templates/huntgroup.erb
View file @
0a35f87a
#
##########################################################
# Huntgroup Puppet Name:
<%=
@name
%>
#
<%-
if
@conditions
.
is_a?
(
Array
)
-%>
<%=
@conditions
.
collect
{
|
cond
|
@
name
+
" "
+
cond
}.
join
(
"
\n
"
)
%>
<%=
@conditions
.
collect
{
|
cond
|
@
huntgroup
+
" "
+
cond
}.
join
(
"
\n
"
)
%>
<%-
else
-%>
<%=
@
name
%>
<%=
@conditions
%>
<%=
@
huntgroup
%>
<%=
@conditions
%>
<%-
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