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 <[email protected]> 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 [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/packer-tool/48745a06-5eaa-4c41-8fbf-d2d21ef599b4%40googlegroups.com > <https://groups.google.com/d/msgid/packer-tool/48745a06-5eaa-4c41-8fbf-d2d21ef599b4%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Alvaro -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CAHqq0ewuRXrdRShn5Wg4Hf3R6%3DVDUxkd9L3mhgOHHOd0ft%2BY8g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
