Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 33 lines (27 sloc) 920 Bytes
# Usage: ./
# It infers the target for the deploy by the files under deploy_target_dir (see below).
# For each host you want to deploy to, put a file in there. Eg, for deploting to "alpha", put alpha.json in.
# ls ./deploy_targets
# => alpha.json
# ./
# => (deploys to alpha using alpha.json)
# ls $deploy_target_Dir
for file in `'ls' -1 $deploy_target_dir | 'grep' -E $json_grepper`
host=`echo $file | 'grep' -E $json_grepper | sed 's/.json$//'`
# The host key might change when we instantiate a new VM, so
# we remove (-R) the old host key from known_hosts
ssh-keygen -R "${host#*@}" 2> /dev/null
tar cj . | ssh -o 'StrictHostKeyChecking no' "$host" '
sudo rm -rf ~/chef &&
mkdir ~/chef &&
cd ~/chef &&
tar xj &&
sudo bash '$path_to_json
Something went wrong with that request. Please try again.