lib/elzar/assistant.rb in elzar-0.0.2 vs lib/elzar/assistant.rb in elzar-0.1.0
- old
+ new
@@ -24,12 +24,14 @@
FileUtils.mkdir_p dest
cp "#{Elzar.templates_dir}/dna.json", dest
cp "#{Elzar.templates_dir}/Gemfile", dest
cp "#{Elzar.templates_dir}/upgrade-chef.sh", dest
cp "#{Elzar.templates_dir}/.rvmrc", dest
+ cp "#{Elzar.templates_dir}/README.md", dest
cp_r "#{Elzar.templates_dir}/data_bags", dest
cp_r "#{Elzar.templates_dir}/script", dest
+ cp_r "#{Elzar.templates_dir}/.chef", dest
end
def self.merge_and_create_temp_directory(user_dir)
dest = Dir.mktmpdir
elzar_dir = "#{dest}/#{ELZAR_DIR}"
@@ -37,11 +39,10 @@
generate_solo_rb dest, Elzar::COOKBOOK_DIRS.map {|dir| "#{CHEF_SOLO_DIR}/#{ELZAR_DIR}/#{dir}" }
cp_r Elzar::ROLES_DIR, dest
cp_r "#{Elzar::CHEF_DIR}/cookbooks", elzar_dir
cp_r "#{Elzar::CHEF_DIR}/site-cookbooks", elzar_dir
- cp_r "#{Elzar::CHEF_DIR}/.chef", dest
# merges user provision with elzar's provision
cp_r "#{user_dir}/.", dest
dest
end
@@ -50,10 +51,9 @@
def self.generate_local_files(dest)
generate_solo_rb dest
cp_r Elzar::ROLES_DIR, dest
cp_r "#{Elzar::CHEF_DIR}/cookbooks", dest
cp_r "#{Elzar::CHEF_DIR}/site-cookbooks", dest
- cp_r "#{Elzar::CHEF_DIR}/.chef", dest
end
def self.generate_user_files(dest, options={})
if options[:authorized_keys]
create_authorized_key_data_bag(options[:authorized_keys], dest)