I am currently building vmware and virtualbox images with packer in the corporate environment (firewalled network) on my local machine, which requires a http/https proxy setting for any internet repo like yum, maven, ansible galaxy etc.
I have currently solved that by setting the env variables in each step (shell scripts, ansible command etc), I wonder if there is a way to set this for all commands that are run in the provisioners.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/48745a06-5eaa-4c41-8fbf-d2d21ef599b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I am currently building vmware and virtualbox images with packer in the corporate environment (firewalled network) on my local machine, which requires a http/https proxy setting for any internet repo like yum, maven, ansible galaxy etc.
I have currently solved that by setting the env variables in each step (shell scripts, ansible command etc), I wonder if there is a way to set this for all commands that are run in the provisioners.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/48745a06-5eaa-4c41-8fbf-d2d21ef599b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
- hosts: xxx
roles:
- xxx
...
environment:
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
I personally do this trick.I always copy a file called proxy.env and first line of the scripts is source the file.If I am on a environment that requires proxy, just put in the file the information.if I am on environment that doesn't require proxy, have an empty file.Not sure for ansible
On Fri, Jul 7, 2017 at 12:56 PM, Alexander Lehmann <alex...@gmail.com> wrote:
I am currently building vmware and virtualbox images with packer in the corporate environment (firewalled network) on my local machine, which requires a http/https proxy setting for any internet repo like yum, maven, ansible galaxy etc.
I have currently solved that by setting the env variables in each step (shell scripts, ansible command etc), I wonder if there is a way to set this for all commands that are run in the provisioners.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/48745a06-5eaa-4c41-8fbf-d2d21ef599b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Alvaro