Skip to content

Instantly share code, notes, and snippets.

@charlesmarshall
Created September 3, 2014 09:03
Show Gist options
  • Select an option

  • Save charlesmarshall/52854ae8fab497f9f9b6 to your computer and use it in GitHub Desktop.

Select an option

Save charlesmarshall/52854ae8fab497f9f9b6 to your computer and use it in GitHub Desktop.
automated vagrant up with token replacement
vagrant destroy -f
vagrant box update
ssh-keygen -f ~/.ssh/known_hosts -R 172.17.8.101
oldIFS="$IFS"
IFS="¬"
content="$(cat ./user-data)"
discovery="$(curl -s https://discovery.etcd.io/new)"
echo "new token: ${discovery}"
echo ${content} | sed -E "s#discovery: (.*)#discovery: ${discovery}#g" > ./user-data
IFS="$oldIFS"
vagrant up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment