diff options
author | Markos Chandras <mchandras@suse.de> | 2018-03-26 16:42:37 +0100 |
---|---|---|
committer | Markos Chandras <mchandras@suse.de> | 2018-03-27 21:12:16 +0100 |
commit | 13d46ccfd5cabbc8b07db5c447a2d5f5feadbeb9 (patch) | |
tree | f31a3416efad4199bb8cae658ad601e9a9cff39f | |
parent | b31d148b5ae1216b2a209784ce11858caeddae4c (diff) |
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 <mchandras@suse.de>
-rw-r--r-- | xci/infra/bifrost/playbooks/opnfv-virtual.yaml | 6 |
1 files changed, 5 insertions, 1 deletions
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') }}" |