Wojciech Bednarski Wojciech Bednarski - 2 years ago 135
Ruby Question

How to pass parameter on 'vagrant up' and have it in the scope of Vagrantfile?

I'm looking for a way to pass parameter to Chef cookbook like:

$ vagrant up some_parameter

And then use
inside one of the Chef cookbooks.

Answer Source

You cannot pass any parameter to vagrant. The only way is to use environment variables

MY_VAR='my value' vagrant up

And use ENV['MY_VAR'] in recipe.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download