From 13d46ccfd5cabbc8b07db5c447a2d5f5feadbeb9 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Mon, 26 Mar 2018 16:42:37 +0100 Subject: xci: bifrost: Only use libvirt as DNS server if using proxy servers Commit 0d332a80cf731e5927c81c9f6929a8b83d43cddd ("Add proxy support") switched the default DNS server to the libvirt bridge. However, we only need to override the default DNS if we are behind a proxy server. Change-Id: I7d8fe8c10a1aba2db4a703a81e74ef76fa593d95 Signed-off-by: Markos Chandras --- xci/infra/bifrost/playbooks/opnfv-virtual.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'xci/infra') diff --git a/xci/infra/bifrost/playbooks/opnfv-virtual.yaml b/xci/infra/bifrost/playbooks/opnfv-virtual.yaml index 3429f2e6..bb0daff6 100644 --- a/xci/infra/bifrost/playbooks/opnfv-virtual.yaml +++ b/xci/infra/bifrost/playbooks/opnfv-virtual.yaml @@ -109,11 +109,15 @@ become: no connection: local gather_facts: yes + pre_tasks: + - name: "Override default bifrost DNS if we are behind a proxy" + set_fact: + ipv4_nameserver: "192.168.122.1" + when: lookup('env','http_proxy') != '' roles: - role: ironic-enroll-dynamic - { role: ironic-inspect-node, when: inspect_nodes | default('false') | bool == true } - role: bifrost-configdrives-dynamic - ipv4_nameserver: 192.168.122.1 - role: bifrost-deploy-nodes-dynamic environment: http_proxy: "{{ lookup('env','http_proxy') }}" -- cgit 1.2.3-korg