setting proxies at roles level using lookup plugin

Change-Id: I4f858af5cf65399e7236c0b7bd6c9d2cb5f1d9da
This commit is contained in:
Lokesh S 2015-07-06 12:37:24 +00:00 committed by loki
parent 650c5c27d6
commit a6fc6c92f5
4 changed files with 17 additions and 0 deletions

View File

@ -85,6 +85,11 @@ Edit ``./playbooks/inventory/group_vars/all`` to match your environment.
- Change network_interface to match the interface that will need to service DHCP requests.
- Change the ironic_db_password which is set by Ansible in MySQL and in Ironic's configuration file.
Proxy::
if running behind the proxy. export environment variables http_proxy and https_proxy
So that ansible lookup plugin checks for proxy set and uses as environment variables.
Then run::
bash ./scripts/env-setup.sh

View File

@ -7,3 +7,6 @@
roles:
- { role: bifrost-prep-for-install, when: skip_install is not defined }
- ironic-install
environment:
http_proxy: "{{ lookup('env','http_proxy') }}"
https_proxy: "{{ lookup('env','https_proxy') }}"

View File

@ -30,6 +30,9 @@
roles:
- { role: bifrost-prep-for-install, when: skip_install is not defined }
- { role: bifrost-openstack-ci-prep, when: ci_testing_zuul is defined }
environment:
http_proxy: "{{ lookup('env','http_proxy') }}"
https_proxy: "{{ lookup('env','https_proxy') }}"
- hosts: localhost
connection: local
name: "Executes install, enrollment, and testing in one playbook"
@ -47,6 +50,9 @@
- role: ironic-install
cleaning: false
testing: true
environment:
http_proxy: "{{ lookup('env','http_proxy') }}"
https_proxy: "{{ lookup('env','https_proxy') }}"
- hosts: baremetal
name: "Enroll node with Ironic"
sudo: no

View File

@ -37,6 +37,9 @@
- role: ironic-enroll
testing: true
- role: bifrost-validate-host-for-deploy
environment:
http_proxy: "{{ lookup('env','http_proxy') }}"
https_proxy: "{{ lookup('env','https_proxy') }}"
- hosts: localhost
connection: local
name: "Executes install, enrollment, and testing in one playbook"