New ansible support (again)
This commit is contained in:
parent
3ff4ed5a77
commit
518c3bc7b8
12 changed files with 33 additions and 33 deletions
|
|
@ -21,17 +21,17 @@ interface {{ iface.name }}
|
|||
|
||||
{% elif 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 %}
|
||||
ip address {{ address.address | ipaddr('address') }} {{ address.address | ipaddr('netmask') }}
|
||||
ip address {{ address.address | ansible.utils.ipaddr('address') }} {{ address.address | ansible.utils.ipaddr('netmask') }}
|
||||
{% if prefix.custom_fields.gateway %}
|
||||
gateway {{ prefix.custom_fields.gateway.address | ipaddr('address') }}
|
||||
gateway {{ prefix.custom_fields.gateway.address | ansible.utils.ipaddr('address') }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
ipv6 address {{ address.address | upper }}
|
||||
{% if prefix.custom_fields.gateway %}
|
||||
ipv6 gateway {{ prefix.custom_fields.gateway.address | ipaddr('address') | upper }}
|
||||
ipv6 gateway {{ prefix.custom_fields.gateway.address | ansible.utils.ipaddr('address') | upper }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue