2018-03-20 13:25:31 -05:00
|
|
|
{% if MGMT_INTERFACE %}
|
2019-01-15 13:27:46 -06:00
|
|
|
{# If MGMT port alias is available, use it for port ID subtype, otherwise use port name #}
|
|
|
|
{% set mgmt_port_name = MGMT_INTERFACE.keys()[0][0] %}
|
2019-01-30 03:05:36 -06:00
|
|
|
{% set ipv4 = MGMT_INTERFACE.keys()[0][1].split('/')[0] %}
|
2019-01-15 13:27:46 -06:00
|
|
|
{% if MGMT_PORT and MGMT_PORT[mgmt_port_name] and MGMT_PORT[mgmt_port_name].alias %}
|
|
|
|
configure ports eth0 lldp portidsubtype local {{ MGMT_PORT[mgmt_port_name].alias }}
|
|
|
|
{% else %}
|
|
|
|
configure ports eth0 lldp portidsubtype local {{ mgmt_port_name }}
|
|
|
|
{% endif %}
|
2019-01-30 03:05:36 -06:00
|
|
|
configure system ip management pattern {{ ipv4 }}
|
2018-03-20 13:25:31 -05:00
|
|
|
{% endif %}
|
2019-02-12 03:40:51 -06:00
|
|
|
configure system hostname {{ DEVICE_METADATA['localhost']['hostname'] }}
|