Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to run a puppet manifest which depends on the target machine having proxy settings to access the Internet.

I haven't been able to pass http_proxy_host as Puppet suggests (I believe its a bug?).

I've tried to update .bashrc on my Debian box (through the puppet manifest) though I'm not sure how to get the settings to take the first time round.

Instead I believe a solution would be to set/pass the env var http_proxy however I'm not sure how/where to do this with Vagrant. suggests using a wrapper like so...

export http_proxy=my.proxy
puppet apply "$@"

I'm not 100% sure where to do this, or if this is the best solution.

Surely I'm not the only one trying to use Vagrant/Puppet & Proxies?

share|improve this question

try setting your proxy like this:

export http_proxy=http://my.proxy:3128
puppet apply "$@"
share|improve this answer

I use a shell provisioner in my Vagrantfile before the Puppet provisioner:

config.vm.provision :shell, :inline => "echo 'export http_proxy=' >> /etc/profile.d/"
share|improve this answer

I'm a bit biased, but I would recommend using vagrant-proxyconf plugin. To configure all Vagrant machines, you can use $HOME/.vagrant.d/Vagrantfile or environment variables. This way you don't need to modify all project specific Vagrantfiles.


Vagrant.configure("2") do |config|
  config.proxy.http  = "http://my.proxy:3128"
  config.proxy.https = "http://my.proxy:3128"
  # other configuration...
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.