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
(cherry picked from commit 5c1632c100)
(cherry picked from commit 9cbe5a1bd6)
(cherry picked from commit 1dd6ad7ccc)
This commit is contained in:
Alessandro Italiano 2020-10-14 16:06:29 +02:00 committed by Takashi Kajinami
parent 5ceb1cd689
commit 063d524dbf
2 changed files with 6 additions and 2 deletions

View File

@ -163,7 +163,11 @@ class keystone::federation::openidc (
}
}
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 -%>