Vagrantfile Vagrant::Environment UI object reference

25 views
Skip to first unread message

Karl Bunch

unread,
Dec 25, 2015, 9:27:57 AM12/25/15
to Vagrant
I've been trying to figure out how to reference the UI object in a Vagrantfile.

I'm not a ruby developer so this may be obvious to others! :-)

I'd like to be able to use a couple methods in the UI object such as "say" or "ask" and "report_progress"

Is there a way to reference the 'Vagrant::Environment' object from inside the configure block in a Vagrantfile?


pixel fairy

unread,
Dec 30, 2015, 2:23:21 AM12/30/15
to Vagrant
Do you mean environment variables? those are in a dictionary called ENV.

Just posted this which uses it, https://groups.google.com/forum/#!topic/vagrant-up/R31Bu-enX-k

Karl Bunch

unread,
Dec 30, 2015, 11:51:39 AM12/30/15
to Vagrant
No I understand how to get process "Environment Variables" I'm looking for a reference to Vagrant::Environment as there are a number of methods and values that could be useful.

It looks like this used to be exposed in the Vagrantfile via @env but it appears to be gone now.
Reply all
Reply to author
Forward
0 new messages