I'm struggling to understand how to pass current vagrant configuration to 
chef.

For example during Vagrant provisioning I have this configuration:

config.vm.provider :aws do |aws, override|
   override.ssh.username = "ubuntu"
   ...
end

...

config.vm.provision :chef_solo do |chef|
  chef.json = {
      username: "ubuntu"
  }
  ...
end

Now how can I reuse the ssh username in chef-solo provisioning? I would 
like be able to write something like this:

config.vm.provision :chef_solo do |chef|
  chef.json = {
      username: config.ssh.username
  }
end

Any help highly appreciated :)

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/bb4c5058-d8ac-4163-9de5-46b66e9545d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to