Unset memcached_servers by default

This change make sure that OIDCMemCacheServers is not set when
the memcached_servers is not set, to avoid setting empty value.

Change-Id: Id9dfbab25b7a064e5fee6d8bf4fe6a171fba9b15
This commit is contained in:
Alessandro Italiano 2020-10-14 16:06:29 +02:00 committed by Takashi Kajinami
parent 2bfe544e16
commit 5c1632c100
2 changed files with 6 additions and 2 deletions

View File

@ -163,7 +163,11 @@ class keystone::federation::openidc (
}
}
$memcached_servers_real = join(any2array($memcached_servers), ' ')
if $memcached_servers != undef {
$memcached_servers_real = join(any2array($memcached_servers), ' ')
} else {
$memcached_servers_real = undef
}
# Note: if puppet-apache modify these values, this needs to be updated
if $template_order <= 330 or $template_order >= 999 {

View File

@ -22,7 +22,7 @@
<%- if scope['::keystone::federation::openidc::openidc_cache_clean_interval'] != nil -%>
OIDCCacheFileCleanInterval scope['::keystone::federation::openidc::openidc_cache_clean_interval'] %>
<%- end -%>
<%- if scope['::keystone::federation::openidc::memcached_servers_real'] -%>
<%- if scope['::keystone::federation::openidc::memcached_servers_real'] != nil -%>
OIDCMemCacheServers "<%= scope['::keystone::federation::openidc::memcached_servers_real'] %>"
<%- end -%>
<%- if scope['::keystone::federation::openidc::redis_server'] != nil -%>