tmatilai/vagrant-proxyconf — pull request #103 by jperville (2014-12-25 08:49:55+00:00)
Title: Detect chef provisioners by type instead of by name (multi-machine), fix #101

@tmatilai, here is my modest attempt at fixing #101 (where chef provisioner detection was broken in multi-machine Vagrantfiles). I have tested by hand that the PR works in both single-machine and multi-machine modes, with the following `Vagrantfile`:

```ruby
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = 'opscode-ubuntu-14.04-chef'
config.vm.box_url = 'http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-14.04_chef-provisionerless.box'

provision = lambda { |chef|
chef.add_recipe "apt::default"
}

if String(ENV['MULTIVM']) == 'true'
config.vm.define "multi" do |machine|
machine.vm.hostname = 'multi'
config.vm.provision(:chef_solo, &provision)
end
else
config.vm.hostname = 'single'
config.vm.provision(:chef_solo, &provision)
end
end

```

In single-machine mode:

```sh
jp440p:u $ MULTIVM=true vagrant ssh -- 'hostname && grep no_proxy /tmp/vagrant-chef-*/solo.rb'
multi
no_proxy "localhost,127.0.0.1,172.17.42.1,10.0.3.1,192.168.56.1,192.168.33.1,192.168.122.1,192.168.33.1,192.168.33.10.xip.io,192.168.33.10.xip.io:81"
```

In multi-machine mode:

```sh
jp440p:u $ MULTIVM=false vagrant ssh -- 'hostname && grep no_proxy /tmp/vagrant-chef-*/solo.rb'
single
no_proxy "localhost,127.0.0.1,172.17.42.1,10.0.3.1,192.168.56.1,192.168.33.1,192.168.122.1,192.168.33.1,192.168.33.10.xip.io,192.168.33.10.xip.io:81"
```

(without the PR, it would return `nil` as the value of the chef no_proxy in the multi-vm case).

Feel free to merge, close #101 and enjoy Christmas @tmatilai.