Created
September 3, 2014 09:03
-
-
Save charlesmarshall/52854ae8fab497f9f9b6 to your computer and use it in GitHub Desktop.
automated vagrant up with token replacement
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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