diff --git a/chef/cookbooks/mysql/recipes/ruby.rb b/chef/cookbooks/mysql/recipes/ruby.rb index b853ec3..4188ba7 100644 --- a/chef/cookbooks/mysql/recipes/ruby.rb +++ b/chef/cookbooks/mysql/recipes/ruby.rb @@ -44,7 +44,7 @@ node['mysql']['client']['packages'].each do |name| resources("package[#{name}]").run_action(:install) end -if node['local_repo'] == "" +if node['local_repo'].nil? or node['local_repo'] == "" chef_gem 'mysql' else gem_package 'mysql' do diff --git a/chef/cookbooks/openstack-image/recipes/image_upload.rb b/chef/cookbooks/openstack-image/recipes/image_upload.rb index 1211775..d6ad807 100644 --- a/chef/cookbooks/openstack-image/recipes/image_upload.rb +++ b/chef/cookbooks/openstack-image/recipes/image_upload.rb @@ -26,7 +26,7 @@ if node['openstack']['image']['syslog']['use'] include_recipe 'openstack-common::logging' 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" end diff --git a/chef/cookbooks/yum/providers/repository.rb b/chef/cookbooks/yum/providers/repository.rb index e79dccf..7e6dbaa 100644 --- a/chef/cookbooks/yum/providers/repository.rb +++ b/chef/cookbooks/yum/providers/repository.rb @@ -31,7 +31,7 @@ def whyrun_supported? end 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 # uniquely naming the execute[yum-makecache] resources. Set the # notifies timing to :immediately for the same reasons. Remove both