puppet-sandbox
puppet-sandbox copied to clipboard
Setup doesn't work if behind proxy
Hi,
The setup does not work if you run it behind a proxy. It will not be able to download the apt keys and packages. Any chance we can supply a http_proxy variable?
err: /Stage[pre]/Mirrors::Apt/Exec[apt_key_puppetlabs]/returns: change from notrun to 0 failed: apt-key adv --keyserver 'pgp.mit.edu' --recv-keys '4BD6EC30' returned 2 instead of one of [0] at /tmp/vagrant-puppet/modules-0/mirrors/manifests/apt.pp:27
The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed!
cd /tmp/vagrant-puppet/manifests && puppet apply --modulepath '/etc/puppet/modules:/tmp/vagrant-puppet/modules-0' default.pp --detailed-exitcodes || [ $? -eq 2 ]
Cheers,
I managed to solve the issue by enabling proxy all around. I can't make a pull request as it's filled with company internals.
What i did was:
- added http_proxy to /etc/environment - for all applications
- enabled http_proxy in /etc/wgetrc - needed for apt-key - though it still failed and I ended up adding the key from a file instead of internet
After this install for puppet-lint failed also because of the proxy. I removed the line that used 'gem' as provider and used the native puppet-lint package. The Puppet package provider for 'gems' does not support install options to supply it with a proxy.
I ran into this issue as well. I resolved it by installing the vagrant-proxyconf plugin and setting export VAGRANT_HTTP_PROXY=<same proxy setting used by HTTP_PROXY>.