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:
Emilien Macchi 2017-07-31 21:52:31 -07:00
parent 13f3e35d98
commit 5fe1f3d2d5
3 changed files with 5 additions and 5 deletions

View File

@ -24,7 +24,7 @@ class openstackci::logserver (
$swift_tenant_name = '',
$swift_region_name = '',
$swift_default_container = '',
$readmes = [],
$readmes = {},
) {
if ! defined(Class['::jenkins::jenkinsuser']) {

View File

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

View File

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