blob: b9aa67da83137baece14d7207bad95faaa31e36d [file] [log] [blame]
Matteo Scandolo3896c472017-08-01 13:31:42 -07001
2{#
3Copyright 2017-present Open Networking Foundation
4
5Licensed under the Apache License, Version 2.0 (the "License");
6you may not use this file except in compliance with the License.
7You may obtain a copy of the License at
8
9http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS,
13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14See the License for the specific language governing permissions and
15limitations under the License.
16#}
17
18
Zack Williamsba5549c2017-03-25 15:04:45 -070019{% for node in physical_node_list if node.name == ansible_hostname %}
20auto {{ node.interface | default(mgmt_interface) }}
21
22iface {{ node.interface | default(mgmt_interface) }} inet static
23 address {{ mgmt_ipv4_first_octets }}.{{ node.ipv4_last_octet }}
24 network {{ mgmt_ipv4_first_octets }}.0
25 netmask 255.255.255.0
26 broadcast {{ mgmt_ipv4_first_octets }}.255
27{% if node.gateway_enabled is defined and node.gateway_enabled %}
28 gateway {{ mgmt_ipv4_first_octets }}.1
29{% endif %}
30{% endfor %}