Make nova.conf more readable
This patch replaces nova.conf.erb with openstack-service.conf.erb from the openstack-common cookbook. Besides removing some redundancy, it also makes nova.conf more readable (due to a fix to openstack-service.conf.erb that never made it to nova.conf.erb). backport: queens pike Change-Id: I07aeb7617ca152f66ec239cef4bcbef642c66bf7
This commit is contained in:
parent
6ac9b3b655
commit
55b58702fa
|
@ -190,11 +190,12 @@ node.default['openstack']['compute']['conf'].tap do |conf|
|
||||||
conf['serial_console']['proxyclient_address'] = serial_console_bind_address
|
conf['serial_console']['proxyclient_address'] = serial_console_bind_address
|
||||||
end
|
end
|
||||||
|
|
||||||
# merge all config options and secrets to be used in the nova.conf.erb
|
# merge all config options and secrets to be used in nova.conf
|
||||||
nova_conf_options = merge_config_options 'compute'
|
nova_conf_options = merge_config_options 'compute'
|
||||||
|
|
||||||
template '/etc/nova/nova.conf' do
|
template '/etc/nova/nova.conf' do
|
||||||
source 'nova.conf.erb'
|
source 'openstack-service.conf.erb'
|
||||||
|
cookbook 'openstack-common'
|
||||||
owner node['openstack']['compute']['user']
|
owner node['openstack']['compute']['user']
|
||||||
group node['openstack']['compute']['group']
|
group node['openstack']['compute']['group']
|
||||||
mode 0o0640
|
mode 0o0640
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
<%= node["openstack"]["compute"]["custom_template_banner"] %>
|
|
||||||
<% @service_config.each do |section, values| -%>
|
|
||||||
[<%= section %>]
|
|
||||||
<% values.each do |key, value| -%>
|
|
||||||
<% if value.class == Hash -%>
|
|
||||||
<%= "# #{value['comment']}" -%>
|
|
||||||
<%= key %> = <%= value['set_to'] %>
|
|
||||||
<% else -%>
|
|
||||||
<%= key %> = <%= value %>
|
|
||||||
<% end -%>
|
|
||||||
<% end -%>
|
|
||||||
<% end -%>
|
|
Loading…
Reference in New Issue