Sha256: 6135fe90f8b832b9efb3ef4aae624f746bced540bcbd362a9ed927fca35aac11
Contents?: true
Size: 847 Bytes
Versions: 1
Compression:
Stored size: 847 Bytes
Contents
base_dir = File.dirname(__FILE__) node = Yajl::Parser.new.parse(File.new("/etc/chef-custom/dna.json", "r")) cookbooks_path = "#{base_dir}/cookbooks" file_store_path base_dir file_cache_path base_dir cookbook_path cookbooks_path role_path "#{base_dir}/roles" node_name node["engineyard"]["this"] require "fileutils" $LOAD_PATH.each do |path| recipe_path = path.gsub(%r{/lib$},'') if File.exist?(metadata_path = File.join(recipe_path, 'metadata.json')) metadata = Yajl::Parser.new.parse(File.new(metadata_path, "r")) if metadata["name"] puts "Unpacking #{metadata["name"]} recipe into cookbooks from #{cookbooks_path}" FileUtils.cp_r(recipe_path, File.join(cookbooks_path, metadata["name"])) else puts "ERROR: Recipe has no 'name' in metadata.json (#{cookbooks_path})" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
engineyard-recipes-0.5.0 | lib/engineyard-recipes/generators/init_bundled_chef_generator/templates/deploy/solo.rb |