Skip to content
Browse files

improve chef-solo bootstrap

  • Loading branch information...
1 parent aa89998 commit a50c0a55044051d7e3471717687feab7ca15d2e1 @obazoud committed Jan 5, 2012
Showing with 13 additions and 6 deletions.
  1. +13 −6 bootstrap.sh
View
19 bootstrap.sh
@@ -1,11 +1,18 @@
#!/bin/sh
set -x
-git clone https://github.com/obazoud/chef-solo-playground && cd chef-solo-playground
-sudo chef-solo -c /tmp/chef-solo-playground/solo.rb -j /tmp/chef-solo-playground/node.json
-# cookbook
-# -r http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz
-rm -rf /tmp/chef-solo-playground
-
+cd /tmp
+if [ $# -gt 0 ]; then
+ wget https://nodeload.github.com/obazoud/chef-solo-playground/tarball/master -O chef-solo-playground.tar.gz
+ tar xzf chef-solo-playground.tar.gz
+ mv obazoud-chef-solo-playground* chef-solo-playground
+ cd chef-solo-playground
+ sudo chef-solo -c /tmp/chef-solo-playground/solo.rb -j /tmp/chef-solo-playground/node.json
+else
+ git clone git://github.com/obazoud/chef-solo-playground && cd chef-solo-playground
+ sudo chef-solo -c /tmp/chef-solo-playground/solo.rb -j /tmp/chef-solo-playground/node.json
+ # default chef-solo cookbook: -r http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz
+ rm -rf /tmp/chef-solo-playground
+fi

0 comments on commit a50c0a5

Please sign in to comment.
Something went wrong with that request. Please try again.