Skip to content
Snippets Groups Projects
Commit 2f2345da authored by Ángel L. Mateo's avatar Ángel L. Mateo
Browse files

Fix huntgroups with array of conditions

Where there is more than one condition, then multiple huntgroup lines
should be created
parent 7dec3d81
No related branches found
No related tags found
No related merge requests found
......@@ -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],
}
......
#
##########################################################
# 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 -%>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment