0
votes

I'm using the recipe git://github.com/opscode-cookbooks/php.git to install php with chef on my vagrant box (ubuntu). Unfortunatly my box is behind a proxy.

It seems that I have to call something like that:

pear config-set http_proxy http://domain:3128

How can I call it and where can I call it?

2

2 Answers

2
votes

You can call it via an execute resource, after installing PHP itself:

include_recipe "php::default"

execute "set proxy for PEAR" do
  command "pear config-set http_proxy http://domain:3128"
end

php_pear "pear_package" do
  version "x.x.x"
  action :install
end

...
0
votes

If it's enough to configure it right after the provision run that installs the php-pear, you can use the vagrant-proxyconf plugin. (But this doesn't help if you need to install the pear packages in the same provisioner run.)