From: Markos Chandras Date: Mon, 26 Mar 2018 15:42:37 +0000 (+0100) Subject: xci: bifrost: Only use libvirt as DNS server if using proxy servers X-Git-Tag: 6.0.0~66^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F85%2F54485%2F3;p=releng-xci.git 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 --- 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') }}"