Skip to content

Instantly share code, notes, and snippets.

@mikezter
Forked from sid137/gist:331691
Created November 9, 2010 11:58
Show Gist options
  • Save mikezter/669003 to your computer and use it in GitHub Desktop.
Save mikezter/669003 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