Getting configuration values inside Vagrantfile

21 views
Skip to first unread message

Joshua Kugler

unread,
Aug 2, 2018, 9:12:00 PM8/2/18
to Vagrant
How does one get information from the config object in a Vagrant file. I see this assignment: c.vm.hostname="blah" but if I try to use #{c.vm.hostname} elsewhere in the Vagrant file (because I want to pass the host name to a shell script in a trigger), I get an exception:  "no implicit conversion of Object into String." Or I just get <Object:0x000000010127e780>.  What is the best way to get a string from that?  Would really like to extract information from the configuration object.


Any ideas?

j

Chris Roberts

unread,
Aug 3, 2018, 4:48:30 PM8/3/18
to Vagrant
Hi there,

Can you please provide a minimal Vagrantfile that demonstrates the failure you are encountering?

Thanks!
Reply all
Reply to author
Forward
0 new messages