New ansible support (again)
This commit is contained in:
parent
3ff4ed5a77
commit
518c3bc7b8
12 changed files with 33 additions and 33 deletions
|
|
@ -32,12 +32,12 @@ snmp-server access public security-model usm priv read public
|
|||
{% for iface in interfaces | sort(attribute="type.value") | sort(attribute="mgmt_only") %}
|
||||
{% if iface.mgmt_only %}
|
||||
{% for address in iface.ip_addresses %}
|
||||
{% set subnet = address.address | ipaddr('subnet') %}
|
||||
{% set subnet = address.address | ansible.utils.ipaddr('subnet') %}
|
||||
{% set prefix = prefixes | selectattr('prefix', '==', subnet) | first %}
|
||||
{% if address.family.value == 4 %}
|
||||
management ip address {{ address.address }}
|
||||
{% if prefix.custom_fields.gateway %}
|
||||
management route add gateway {{ prefix.custom_fields.gateway.address | ipaddr('address') }}
|
||||
management route add gateway {{ prefix.custom_fields.gateway.address | ansible.utils.ipaddr('address') }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
management ipv6 address {{ address.address }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue