This manual explains the settings for running Vagrant in a proxy environment.
-
Install vagrant-proxyconf plugin. (http://weblabo.oscasierra.net/vagrant-proxyconf/)
$ set http_proxy=http://{proxy_ip}:{proxy_port} $ set https_proxy=http://{proxy_ip}:{proxy_port} $ vagrant plugin install vagrant-proxyconf
* If you are using an authentication proxy, specify the user name and password in the Proxy setting as shown below.
$ set http_proxy=http://{username}:{password}@{proxy_ip}:{proxy_port} $ set https_proxy=http://{username}:{password}@{proxy_ip}:{proxy_port} $ vagrant plugin install vagrant-proxyconf
-
Enable your proxy setting in your Vagrantfile under the cloned setup-vagrant directory. Below is an example how to setup the proxy.
if Vagrant.has_plugin?("vagrant-proxyconf") config.proxy.http = "http://{proxy_ip}:{proxy_port}/" config.proxy.https = "http://{proxy_ip}:{proxy_port}/" config.proxy.no_proxy = "personium.example.com,127.0.0.1" end
* If you are using an authentication proxy, specify the user name and password in the Proxy setting as shown below.
if Vagrant.has_plugin?("vagrant-proxyconf") config.proxy.http = "http://{username}:{password}@{proxy_ip}:{proxy_port}/" config.proxy.https = "http://{username}:{password}@{proxy_ip}:{proxy_port}/" config.proxy.no_proxy = "personium.example.com,127.0.0.1" end
-
Enable your proxy setting in your Ansible tasks. The task to activate is "deploy maven's setting.xml". Task file is ./ansible/tasks/bastion/init_maven.yml.
- name: deploy maven's setting.xml template: src=./resource/bastion/tmp/settings.xml.j2 dest=/root/.m2/settings.xml owner=root group=root mode=0644
* If you are using an authentication proxy, modify ./ansible/resource/bastion/tmp/settings.xml.j2. Uncomment the following comment.
<!-- <username>{{maven_proxy_username.stdout}}</username> <password>{{maven_proxy_password.stdout}}</password> -->