Iterate readmes as an hash
- In vhosts templates, iterates each key/value from the hash by using the proper Ruby syntax: https://ruby-doc.org/core-2.2.0/Hash.html - In logserver.pp, default readmes to an empty hash instead of an empty array. Change-Id: Ib1c70cfd9254bb4da9b6f7477baa48918de16cc2
This commit is contained in:
parent
13f3e35d98
commit
5fe1f3d2d5
|
@ -24,7 +24,7 @@ class openstackci::logserver (
|
|||
$swift_tenant_name = '',
|
||||
$swift_region_name = '',
|
||||
$swift_default_container = '',
|
||||
$readmes = [],
|
||||
$readmes = {},
|
||||
) {
|
||||
|
||||
if ! defined(Class['::jenkins::jenkinsuser']) {
|
||||
|
|
|
@ -53,9 +53,9 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
|
|||
Satisfy Any
|
||||
</Directory>
|
||||
|
||||
<% @readmes.each do |pattern| -%>
|
||||
<% @readmes.each do |pattern, helpfile| -%>
|
||||
<Directory <%= @docroot %><%= pattern %>>
|
||||
ReadmeName <%= @readmes[pattern] %>
|
||||
ReadmeName <%= helpfile %>
|
||||
</Directory>
|
||||
<% end -%>
|
||||
|
||||
|
|
|
@ -67,9 +67,9 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
|
|||
Satisfy Any
|
||||
</Directory>
|
||||
|
||||
<% @readmes.each do |pattern| -%>
|
||||
<% @readmes.each do |pattern, helpfile| -%>
|
||||
<Directory <%= @docroot %><%= pattern %>>
|
||||
ReadmeName <%= @readmes[pattern] %>
|
||||
ReadmeName <%= helpfile %>
|
||||
</Directory>
|
||||
<% end -%>
|
||||
|
||||
|
|
Loading…
Reference in New Issue