forked from voxpupuli/puppet-squid
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the option to use an array for extra_config_section
The option "extra_config_section" can be defined as an array, this adds the option to create multiple lines instead of one big line with all the parameters. This commit addresses issue voxpupuli#31
- Loading branch information
Showing
6 changed files
with
74 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
# <%= @comment %> | ||
<% if @config_entries.is_a?(Array) -%> | ||
<% @config_entries.each do |i| -%> | ||
<% i.each do |k, v| -%> | ||
<% v.each do |v2| -%> | ||
<%= k %> <%= v2 %> | ||
<% end -%> | ||
<% end -%> | ||
<% end -%> | ||
<% else -%> | ||
<% @config_entries.each do |k,v| -%> | ||
<%= k %> <%= v.is_a?(Array) ? v.join(' ') : v %> | ||
<% end -%> | ||
<% end -%> | ||
|