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
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -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],
  }
+2 −6
Original line number Diff line number Diff line

#
##########################################################
# 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 -%>