~$ tail -13 Vagrantfile
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
chef.add_recipe "varnish::varnish_repo"
chef.add_recipe "apt"
chef.add_recipe "varnish"
chef.json = {
:varnish => {
:version => "3.0"
}
}
end
end
~$ vagrant up
[default] Importing base box 'lucid64'...
...
[Thu, 05 Apr 2012 08:03:28 -0700] INFO: Report handlers complete
~$ vagrant ssh
~vagrant$ ps ax | grep -i varnish | grep -v grep
1289 ? Ss 0:00 /usr/sbin/varnishd -P /var/run/varnishd.pid -a :6081 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m
1291 ? Sl 0:00 /usr/sbin/varnishd -P /var/run/varnishd.pid -a :6081 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m
~vagrant$ sudo service varnish restart
* Stopping HTTP accelerator varnishd
...done.
* Starting HTTP accelerator varnishd
...done.
~vagrant$ ps ax | grep -i varnish | grep -v grep
1568 ? Ss 0:00 /usr/sbin/varnishd -P /var/run/varnishd.pid -a :6081 -f /etc/varnish/default.vcl -T 127.0.0.1:6082 -u varnish -g varnish -t 120 -w 5,500,300 -s file,/var/lib/varnish/lucid64/varnish_storage.bin,1G -S /etc/varnish/secret -n lucid64
1569 ? Sl 0:00 /usr/sbin/varnishd -P /var/run/varnishd.pid -a :6081 -f /etc/varnish/default.vcl -T 127.0.0.1:6082 -u varnish -g varnish -t 120 -w 5,500,300 -s file,/var/lib/varnish/lucid64/varnish_storage.bin,1G -S /etc/varnish/secret -n lucid64
Nothing even changes until you add the apt_repo recipe, and even then, it still adds 2.1 by default (likely more platforms, although probably needs more logic for that)
https://github.com/opscode-cookbooks/varnish/pull/2