schubergphilis / vagrant-chef-zero

Vagrant Plugin for Chef Zero
Apache License 2.0
91 stars 42 forks source link

Pass chef_server_url into guests? #38

Open jro opened 10 years ago

jro commented 10 years ago

It seems like provisioning the guests work just fine. If I ssh into the guest and try to run chef-client I see there isn't a /etc/chef/client.rb, so it doesn't know how to find the chef-zero server running on the host.

It seems like the vagrant chef_client should be creating that config but maybe I'm missing something. Is there any way to pass that value into the guest in a way I can create the config file from?

jro commented 10 years ago

It's possible it's already in the code somewhere and I just missed it, but it occurs to me that one solution might be to have vagrant-chef-zero populate node.vagrant-chef-zero.[key] with useful info like what the host machine IP that would be used by the chef_client provisioner.

electrofelix commented 9 years ago

Look for /tmp/vagrant-chef/client.rb, the command line used is something like:

sudo chef-client -c /tmp/vagrant-chef/client.rb -j /tmp/vagrant-chef/dna.json

miguelaferreira commented 9 years ago

@jro Did @electrofelix's reply help you?