lib/awsborn/rake.rb in awsborn-0.5.1 vs lib/awsborn/rake.rb in awsborn-0.5.2
- old
+ new
@@ -76,9 +76,19 @@
task :new_cookbook do
create_cookbook("cookbooks")
end
end
+ desc "Update chef on the server"
+ task :update_chef do |t,args|
+ hosts = get_hosts(args)
+ default_cluster.each do |server|
+ puts framed("Updating chef on server")
+ # Include excplicit path to avoid rvm
+ sh "ssh root@#{server.host_name} 'PATH=/usr/sbin:/usr/bin:/sbin:/bin gem install chef --no-ri --no-rdoc'"
+ end
+ end
+
def create_cookbook(dir) #:nodoc:
raise "Must provide a cookbook=" unless ENV["cookbook"]
puts "** Creating cookbook #{ENV["cookbook"]}"
sh "mkdir -p #{File.join(dir, ENV["cookbook"], "attributes")}"
sh "mkdir -p #{File.join(dir, ENV["cookbook"], "recipes")}"
\ No newline at end of file