diff --git a/manifests/profile/base/keystone.pp b/manifests/profile/base/keystone.pp index 9d56b7507..8408ec15b 100644 --- a/manifests/profile/base/keystone.pp +++ b/manifests/profile/base/keystone.pp @@ -235,6 +235,7 @@ class tripleo::profile::base::keystone ( if $step >= 4 or ( $step >= 3 and $sync_db ) { $oslomsg_rpc_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_rpc_use_ssl))) $oslomsg_notify_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_notify_use_ssl))) + $memcached_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211') class { '::keystone': sync_db => $sync_db, @@ -257,7 +258,8 @@ class tripleo::profile::base::keystone ( }), notification_topics => union($ceilometer_notification_topics, $barbican_notification_topics, - $extra_notification_topics) + $extra_notification_topics), + cache_memcache_servers => $memcached_servers } if 'amqp' in [$oslomsg_rpc_proto, $oslomsg_notify_proto]{ @@ -292,7 +294,6 @@ class tripleo::profile::base::keystone ( } if $keystone_openidc_enabled { - $memcached_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211') class { '::keystone::federation::openidc': openidc_cache_type => 'memcache', diff --git a/spec/classes/tripleo_profile_base_keystone_spec.rb b/spec/classes/tripleo_profile_base_keystone_spec.rb index 649cddca7..18b0496ef 100644 --- a/spec/classes/tripleo_profile_base_keystone_spec.rb +++ b/spec/classes/tripleo_profile_base_keystone_spec.rb @@ -30,6 +30,7 @@ describe 'tripleo::profile::base::keystone' do :oslomsg_notify_username => 'keystone2', :oslomsg_notify_password => 'baa', :oslomsg_notify_port => '5678', + :memcached_ips => [ '192.168.0.3', '192.168.0.4', '192.168.0.5' ], } end @@ -62,7 +63,8 @@ describe 'tripleo::profile::base::keystone' do it 'should trigger complete configuration' do is_expected.to contain_class('keystone').with( :default_transport_url => 'rabbit://keystone1:foo@192.168.0.1:1234/?ssl=0', - :notification_transport_url => 'rabbit://keystone2:baa@192.168.0.2:5678/?ssl=0' + :notification_transport_url => 'rabbit://keystone2:baa@192.168.0.2:5678/?ssl=0', + :cache_memcache_servers => [ '192.168.0.3:11211', '192.168.0.4:11211', '192.168.0.5:11211' ], ) is_expected.to contain_class('keystone::config') is_expected.to contain_class('keystone::logging') @@ -108,7 +110,8 @@ describe 'tripleo::profile::base::keystone' do it 'should trigger keystone configuration' do is_expected.to contain_class('keystone').with( :default_transport_url => 'rabbit://keystone1:foo@192.168.0.1:1234/?ssl=0', - :notification_transport_url => 'rabbit://keystone2:baa@192.168.0.2:5678/?ssl=0' + :notification_transport_url => 'rabbit://keystone2:baa@192.168.0.2:5678/?ssl=0', + :cache_memcache_servers => [ '192.168.0.3:11211', '192.168.0.4:11211', '192.168.0.5:11211' ], ) is_expected.to contain_class('keystone::config') is_expected.to contain_class('keystone::logging') @@ -134,7 +137,8 @@ describe 'tripleo::profile::base::keystone' do it 'should trigger keystone configuration' do is_expected.to contain_class('keystone').with( :default_transport_url => 'rabbit://keystone1:foo@192.168.0.1:1234/?ssl=0', - :notification_transport_url => 'rabbit://keystone2:baa@192.168.0.2:5678/?ssl=0' + :notification_transport_url => 'rabbit://keystone2:baa@192.168.0.2:5678/?ssl=0', + :cache_memcache_servers => [ '192.168.0.3:11211', '192.168.0.4:11211', '192.168.0.5:11211' ], ) is_expected.to contain_class('keystone::config') is_expected.to contain_class('keystone::logging')