Unverified Commit 0a35f87a authored by Jonathan's avatar Jonathan Committed by GitHub
Browse files

Merge pull request #98 from amateo/feature/huntgroup

Fix huntgroups when there is more than one condition
parents f0d20754 2f2345da
......@@ -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 -%>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment