Permalink
Browse files

split converge into tasks/converge.rake

  • Loading branch information...
1 parent 105992f commit dced7088f95fbfa29bb4abff957626648f89084a @bleything committed Jul 28, 2012
Showing with 7 additions and 6 deletions.
  1. +1 −6 Rakefile
  2. +6 −0 tasks/converge.rake
View
@@ -64,9 +64,4 @@ task :bundle_cookbook, :cookbook do |t, args|
FileUtils.rm_rf temp_dir
end
-desc "Runs chef-solo with the given config/<dna>.json"
-task :converge, :dna do |t, args|
- config_dir = File.expand_path(File.dirname(__FILE__)) + "/config"
- fail "config/#{args[:dna]}.json does not exist" unless File.exists?( config_dir + "/#{args[:dna]}.json" )
- sh "chef-solo -c #{config_dir}/solo.rb -j #{config_dir}/#{args[:dna]}.json"
-end
+Dir['tasks/*rake'].each {|r| load r }
View
@@ -0,0 +1,6 @@
+desc "Runs chef-solo with the given config/<dna>.json"
+task :converge, :dna do |t, args|
+ config_dir = File.expand_path(File.dirname(__FILE__) + '/..') + "/config"
+ fail "config/#{args[:dna]}.json does not exist" unless File.exists?( config_dir + "/#{args[:dna]}.json" )
+ sh "chef-solo -c #{config_dir}/solo.rb -j #{config_dir}/#{args[:dna]}.json"
+end

0 comments on commit dced708

Please sign in to comment.