diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e1e5c1..e963d6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # CHANGELOG for cookbook-openstack-identity - This file is used to list changes made in each version of cookbook-openstack-identity. +## 9.2.0 +* Add support for miscellaneous options (like in Compute) + ## 9.1.1 * Fix package action to allow updates diff --git a/README.md b/README.md index f158827..a576367 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,7 @@ Register users, tenants, roles, services and endpoints with Keystone - api_ver: API Version for Keystone server - Accepted values are [ "/v2.0" ] - auth_token: Auth Token for communication with Keystone server +- misc_keystone: Array of strings to be added to the keystone.conf file ### :create_tenant Specific Attributes @@ -257,6 +258,7 @@ TODO: Add DB2 support on other platforms * `openstack['identity']["rpc_thread_pool_size"]` - Size of RPC thread pool * `openstack['identity']["rpc_conn_pool_size"]` - Size of RPC connection pool * `openstack['identity']["rpc_response_timeout"]` - Seconds to wait for a response from call or multicall +* `openstack['identity']["misc_keystone"]` - Array of strings to be added to keystone.conf The following attributes are defined in attributes/default.rb of the common cookbook, but are documented here due to their relevance: diff --git a/attributes/default.rb b/attributes/default.rb index 750a6ef..040a033 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -173,6 +173,11 @@ default['openstack']['identity']['token_flush_cron']['minute'] = '0' default['openstack']['identity']['token_flush_cron']['day'] = '*' default['openstack']['identity']['token_flush_cron']['weekday'] = '*' +# Misc option support +# Allow additional strings to be added to keystone.conf +# For example: ['# Comment', 'key=value'] +default['openstack']['identity']['misc_keystone'] = [] + # platform defaults case platform_family when 'fedora', 'rhel' # :pragma-foodcritic: ~FC024 - won't fix this diff --git a/metadata.rb b/metadata.rb index 4d0fe35..22aa953 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ maintainer_email 'matt@opscode.com' license 'Apache 2.0' description 'The OpenStack Identity service Keystone.' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '9.1.1' +version '9.2.0' recipe 'openstack-identity::client', 'Install packages required for keystone client' recipe 'openstack-identity::server', 'Installs and Configures Keystone Service' diff --git a/spec/server_spec.rb b/spec/server_spec.rb index b2b8029..1566b70 100644 --- a/spec/server_spec.rb +++ b/spec/server_spec.rb @@ -356,6 +356,14 @@ describe 'openstack-identity::server' do end end + it 'templates misc_keystone array correctly' do + node.set['openstack']['identity']['misc_keystone'] = ['MISC1=OPTION1', 'MISC2=OPTION2'] + expect(chef_run).to render_file(path).with_content( + /^MISC1=OPTION1$/) + expect(chef_run).to render_file(path).with_content( + /^MISC2=OPTION2$/) + end + it 'notifies keystone restart' do expect(resource).to notify('service[keystone]').to(:restart) end diff --git a/templates/default/keystone.conf.erb b/templates/default/keystone.conf.erb index 9375ec7..3bccc49 100644 --- a/templates/default/keystone.conf.erb +++ b/templates/default/keystone.conf.erb @@ -23,6 +23,13 @@ rpc_conn_pool_size=<%= node["openstack"]["identity"]["rpc_conn_pool_size"] %> rpc_response_timeout=<%= node["openstack"]["identity"]["rpc_response_timeout"] %> rpc_backend=<%= node["openstack"]["identity"]["rpc_backend"] %> +# Misc options +<% if node["openstack"]["identity"]["misc_keystone"] %> +<% node["openstack"]["identity"]["misc_keystone"].each do |m| %> +<%= m %> +<% end %> +<% end %> + <% if @memcache_servers -%> [memcache] servers = <%= @memcache_servers %>