add None check for variable node[local_repo]
Change-Id: Ia8b5c6542b2ea18c888eb2d4479144cb19a7e584
This commit is contained in:
parent
d1791263a1
commit
70e4160abd
@ -44,7 +44,7 @@ node['mysql']['client']['packages'].each do |name|
|
|||||||
resources("package[#{name}]").run_action(:install)
|
resources("package[#{name}]").run_action(:install)
|
||||||
end
|
end
|
||||||
|
|
||||||
if node['local_repo'] == ""
|
if node['local_repo'].nil? or node['local_repo'] == ""
|
||||||
chef_gem 'mysql'
|
chef_gem 'mysql'
|
||||||
else
|
else
|
||||||
gem_package 'mysql' do
|
gem_package 'mysql' do
|
||||||
|
@ -26,7 +26,7 @@ if node['openstack']['image']['syslog']['use']
|
|||||||
include_recipe 'openstack-common::logging'
|
include_recipe 'openstack-common::logging'
|
||||||
end
|
end
|
||||||
|
|
||||||
if node['local_repo'] != ""
|
unless node['local_repo'].nil? or node['local_repo'] == ""
|
||||||
node.override['openstack']['image']['upload_image']['cirros'] = "#{node['local_repo']}/cirros-0.3.2-x86_64-disk.img"
|
node.override['openstack']['image']['upload_image']['cirros'] = "#{node['local_repo']}/cirros-0.3.2-x86_64-disk.img"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ def whyrun_supported?
|
|||||||
end
|
end
|
||||||
|
|
||||||
action :create do
|
action :create do
|
||||||
if node['local_repo'] == ""
|
if node['local_repo'].nil? or node['local_repo'] == ""
|
||||||
# Hack around the lack of "use_inline_resources" before Chef 11 by
|
# Hack around the lack of "use_inline_resources" before Chef 11 by
|
||||||
# uniquely naming the execute[yum-makecache] resources. Set the
|
# uniquely naming the execute[yum-makecache] resources. Set the
|
||||||
# notifies timing to :immediately for the same reasons. Remove both
|
# notifies timing to :immediately for the same reasons. Remove both
|
||||||
|
Loading…
x
Reference in New Issue
Block a user