If you're just reading in a file then you'll need to take some explicit action to force interpolation to occur. This sounds like your exact question here: http://stackoverflow.com/questions/346380/in-ruby-can-you-perform-string-interpolation-on-data-read-from-a-file
On Thu, Jul 17, 2014 at 5:52 AM, Brendan Murtagh <[email protected]> wrote: > Hi Alvaro, > > When I had the chef.json entries inline with each node's declaration, the > JSON works as expected. The hostname() method and COMPONENTS hash are > written within the Vagrantfile and accessible. It's that transition when > being parsed or interpolated from the external file, that the variables do > not get populated with their true values. It seems like the file is read in > during the provisioning process as literal strings which works for JSON > entries that do not contain variables, but once a variable is introduced, > it gets written as-is instead of its intended behavior. > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Vagrant" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/vagrant-up/aOwrLLmmxS0/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
