[CORD-2270]
Support head node on Ubuntu 16.04 (Xenial)
Change-Id: Ic13ea784b8fa55a481f08d21f5187fd37d13499c
diff --git a/roles/dhcpd/defaults/main.yml b/roles/dhcpd/defaults/main.yml
index 66edc52..9772910 100644
--- a/roles/dhcpd/defaults/main.yml
+++ b/roles/dhcpd/defaults/main.yml
@@ -1,4 +1,4 @@
-
+---
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,18 +13,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
----
# dhcpd/defaults/main.yml
-# http://serverfault.com/questions/40712/what-range-of-mac-addresses-can-i-safely-use-for-my-virtual-machines
-hwaddr_prefix: "c2a4"
-
site_name: placeholder-sitename
site_suffix: "{{ site_name }}.test"
-# Management IP range from DHCP settings
-mgmt_ipv4_first_octets: "192.168.200"
+management_net_cidr: "192.168.200.0/24"
+
+vtn_net_management_host_cidr: "{{ management_net_cidr }}"
+
+# http://serverfault.com/questions/40712/what-range-of-mac-addresses-can-i-safely-use-for-my-virtual-machines
+vtn_net_management_host_hwaddr_prefix: "06A6"
# node lists
head_lxd_list: []
@@ -33,13 +32,10 @@
dns_search:
- "{{ site_suffix }}"
-dns_servers:
- - "{{ mgmt_ipv4_first_octets }}.1"
-
dhcpd_subnets:
- - interface: mgmtbr
- cidr: "{{ mgmt_ipv4_first_octets }}.1/24"
- dhcp_first: 129
+ - interface: mgmtbridge
+ cidr: "{{ management_net_cidr }}"
+ dhcp_first: 193
dhcp_last: 254
other_static:
- physical_node_list
diff --git a/roles/dhcpd/templates/dhcpd.conf.j2 b/roles/dhcpd/templates/dhcpd.conf.j2
index 072d6d7..c54e578 100644
--- a/roles/dhcpd/templates/dhcpd.conf.j2
+++ b/roles/dhcpd/templates/dhcpd.conf.j2
@@ -1,4 +1,3 @@
-
{#
Copyright 2017-present Open Networking Foundation
@@ -15,7 +14,6 @@
limitations under the License.
#}
-
# dhcpd.conf
# Managed by Ansible!
@@ -52,7 +50,7 @@
option host-name "{{ node.name }}";
{% set host_ipaddr = (subnet.cidr | ipaddr(node.ipv4_last_octet) | ipaddr('address')) %}
fixed-address {{ host_ipaddr }};
- hardware ethernet {{ node.hwaddr | default(hwaddr_prefix ~ (host_ipaddr | ip4_hex)) | hwaddr('unix') }};
+ hardware ethernet {{ node.hwaddr | default(vtn_net_management_host_hwaddr_prefix ~ (host_ipaddr | ip4_hex)) | hwaddr('unix') }};
{% if node.pxe_filename is defined %}
filename "{{ node.pxe_filename }}";
next-server {{ subnet.tftp_server | default(subnet.cidr | ipaddr('1') | ipaddr('address')) }};
@@ -69,7 +67,7 @@
option host-name "{{ node.name }}";
{% set host_ipaddr = (subnet.cidr | ipaddr(node.ipv4_last_octet) | ipaddr('address')) %}
fixed-address {{ host_ipaddr }};
- hardware ethernet {{ node.hwaddr | default(hwaddr_prefix ~ (host_ipaddr | ip4_hex)) | hwaddr('unix') }};
+ hardware ethernet {{ node.hwaddr | default(vtn_net_management_host_hwaddr_prefix ~ (host_ipaddr | ip4_hex)) | hwaddr('unix') }};
{% if node.pxe_filename is defined %}
filename "{{ subnet.pxe_filename }}";
next-server {{ subnet.tftp_server | default(subnet.cidr | ipaddr('1') | ipaddr('address')) }};