Skip to content

Instantly share code, notes, and snippets.

@nohtyp
Last active December 31, 2015 01:59
Show Gist options
  • Save nohtyp/7917292 to your computer and use it in GitHub Desktop.
Save nohtyp/7917292 to your computer and use it in GitHub Desktop.
This command line builds a vagrant server and concurrently provisions the system.
#!/bin/bash
#Used examples in the following link:
#http://coldattic.info/shvedsky/pro/blogs/a-foo-walks-into-a-bar/posts/7
#awk $0 is the entire line -> $1 is first argument -> line is making entire line equal first arg.
#will provision machines concurrently in vagrant
NUMPROCS='2'
vagrant up --no-provision;vagrant status |grep 'virtualbox' |awk '$0=$1'| xargs --max-procs=$NUMPROCS -I HOST vagrant provision HOST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment