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:
@@ -24,7 +24,7 @@ class openstackci::logserver (
|
|||||||
$swift_tenant_name = '',
|
$swift_tenant_name = '',
|
||||||
$swift_region_name = '',
|
$swift_region_name = '',
|
||||||
$swift_default_container = '',
|
$swift_default_container = '',
|
||||||
$readmes = [],
|
$readmes = {},
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if ! defined(Class['::jenkins::jenkinsuser']) {
|
if ! defined(Class['::jenkins::jenkinsuser']) {
|
||||||
|
|||||||
@@ -53,9 +53,9 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
|
|||||||
Satisfy Any
|
Satisfy Any
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
<% @readmes.each do |pattern| -%>
|
<% @readmes.each do |pattern, helpfile| -%>
|
||||||
<Directory <%= @docroot %><%= pattern %>>
|
<Directory <%= @docroot %><%= pattern %>>
|
||||||
ReadmeName <%= @readmes[pattern] %>
|
ReadmeName <%= helpfile %>
|
||||||
</Directory>
|
</Directory>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
|
|||||||
@@ -67,9 +67,9 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
|
|||||||
Satisfy Any
|
Satisfy Any
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
<% @readmes.each do |pattern| -%>
|
<% @readmes.each do |pattern, helpfile| -%>
|
||||||
<Directory <%= @docroot %><%= pattern %>>
|
<Directory <%= @docroot %><%= pattern %>>
|
||||||
ReadmeName <%= @readmes[pattern] %>
|
ReadmeName <%= helpfile %>
|
||||||
</Directory>
|
</Directory>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user