Skip to content

Instantly share code, notes, and snippets.

@sid137
Created March 14, 2010 01:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sid137/331691 to your computer and use it in GitHub Desktop.
Save sid137/331691 to your computer and use it in GitHub Desktop.
export VPS=YOUR.IP.ADDRESS.HERE
function initialize {
rm .ssh/known_hosts
server=${1:=${VPS}}
role=$2
: ${role:=rails}
ssh-copy-id -i ~/.ssh/id_rsa root@$server
ssh root@$1 "wget http://github.com/sid137/chef-repo/raw/master/install.sh -O install.sh && /bin/bash -x install.sh ${role}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment