-Dir.glob("/var/cache/chef/osmosis-*.zip").each do |zip|
- next if zip == "/var/cache/chef/#{osmosis_package}"
+osmosis_version = node[:osmosis][:version]
+osmosis_package = "osmosis-#{osmosis_version}.zip"
+osmosis_directory = "/opt/osmosis-#{osmosis_version}"
+
+Dir.glob("#{cache_dir}/osmosis-*.zip").each do |zip|
+ next if zip == "#{cache_dir}/#{osmosis_package}"