-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.rb
33 lines (33 loc) · 838 Bytes
/
default.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# After creating your AWS servers and setting up your ssh key
#
namespace :chef_client do
desc "Make your chef clients"
task :doit , :roles=> :c_client do
servers.hostname
servers.upgrade
servers.build
ruby.rvm
ruby.rvm
ruby.chef.client
end
end
#
#
namespace :chef_server do
desc "Make your chef server"
task :doit , :roles=> :c_server do
servers.hostname
servers.upgrade
servers.build
ruby.rvm
ruby.rvm
ruby.chef.server
end
desc "Setup Knife on server"
task :knifesetup, :roles=> :c_server do
run "mkdir -p #{user_home_dir}/.chef"
run "#{sudo} cp /etc/chef/validation.pem /etc/chef/webui.pem #{user_home_dir}/.chef ; #{sudo} chown -R $USER #{user_home_dir}/.chef"
run "knife configure --defaults --yes --repository . "
run "knife client list"
end
end