summaryrefslogtreecommitdiffstats
path: root/xci/playbooks/roles/bootstrap-host/templates/osa
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2018-06-07 13:30:03 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-06-07 13:30:03 +0000
commit473a4d2598894e82e845310e3763a0ec8d6689c2 (patch)
treee0abafae54902286a0545c5363cedfdb900d5992 /xci/playbooks/roles/bootstrap-host/templates/osa
parent41d49bfaa73bee43ad17addbdf75eec94fc3ecbb (diff)
parenta82590eb643383127abea5dc7320445e03d7a9c2 (diff)
Merge "roles: bootstrap-host: Ensure DNS info from IDF is respected"
Diffstat (limited to 'xci/playbooks/roles/bootstrap-host/templates/osa')
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j23
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/osa/redhat.interface.j27
2 files changed, 10 insertions, 0 deletions
diff --git a/xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j2
index 3eddce45..f9e4d8df 100644
--- a/xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j2
+++ b/xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j2
@@ -32,5 +32,8 @@ iface {{ item.name }} inet static
{% if item.network is defined and item.network.gateway is defined %}
gateway {{ item.network.gateway | ipaddr('address') }}
{% endif %}
+{% if item.network is defined and item.network.dns is defined %}
+ dns-nameservers {{ item.network.dns }}
+{% endif %}
{% endif %}
diff --git a/xci/playbooks/roles/bootstrap-host/templates/osa/redhat.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/osa/redhat.interface.j2
index fa957764..3a51eb86 100644
--- a/xci/playbooks/roles/bootstrap-host/templates/osa/redhat.interface.j2
+++ b/xci/playbooks/roles/bootstrap-host/templates/osa/redhat.interface.j2
@@ -17,3 +17,10 @@ STP=off
{% if item.network is defined %}
IPADDR={{ item.network.address }}
{% endif %}
+{% if item.network is defined and item.network.gateway is defined %}
+GATEWAY="{{ host_info[inventory_hostname]['public']['gateway'] | ipaddr('address') }}"
+{% endif %}
+{% if item.network is defined and item.network.dns is defined %}
+DNS="{{ host_info[inventory_hostname]['public']['dns'] }}"
+{% endif %}
+{% endif %}