module-nginx/templates/conf.d/upstream_header.erb
Carl P. Corliss 9cf983504a Reintegrate jfryman/puppet-nginx#331 (upstream exports/collections)
- resurrecting jfryman/puppet-nginx#331 from @rainopik
- update (concat/stdlib) dependency version requirements based on current usage
- fix upstream tests to work with rainopik's changes in what was jfryman/puppet-nginx#331
2014-06-21 12:36:28 -04:00

12 lines
421 B
Text

upstream <%= @name %> {
<% if @upstream_cfg_prepend -%><% @upstream_cfg_prepend.sort_by{|k,v| k}.each do |key,value| %>
<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%>
<% Array(subvalue).each do |asubvalue| -%>
<%= key %> <%= subkey %> <%= asubvalue %>;
<% end -%>
<% end -%><% else -%>
<% Array(value).each do |asubvalue| -%>
<%= key %> <%= asubvalue %>;
<% end -%>
<% end -%>
<% end -%><% end -%>