Open iavael opened 10 years ago
Essentially it'll take the first match rather than checking for the one matching the network of the provider. This is currently necessary since the chef_server_url must be set before vagrant validates the configuration of any chef_client provisioner steps.
The only solutions appear to be binding to all addresses using '0.0.0.0' (any security concerns?), or insert a dummy url, move the start and upload to after the provider runs and before the provisioner steps, and extract the correct network address to use from the provider.
I've also seen problems with network interface selection and Window's systems with various firewalls (really painful in a corporate env when frequently you can't modify or disable them) where using the machines public interface worked but none of the private ones could be communicated with from within the guest.
The only solutions appear to be binding to all addresses using '0.0.0.0' (any security concerns?)
I think this is the best variant. People concerned about security of their development/testing environment already have a firewall.
This code in lib/vagrant-chef-zero/env_helpers.rb incorrectly detects address of chef-zero server (it takes address of another interface with private address)