You're right. The argument passing method is a parameter :args .
config.vm.provision :shell, :path => "bootstrap.sh", :args => "'first arg' second"
Note that single quotes around first arg are only needed if you want to include spaces in the part of the passed argument. That is, the above code is equivalent to entering the following in the terminal:
$ bootstrap.sh 'first arg' second
Where inside the script, $ 1 refers to the string "first arg", and $ 2 refers to the string "second".
The v2 docs can be found here: http://docs.vagrantup.com/v2/provisioning/shell.html
Johann May 24 '13 at 20:15 2013-05-24 20:15
source share