New ansible support (again)
This commit is contained in:
parent
3ff4ed5a77
commit
518c3bc7b8
12 changed files with 33 additions and 33 deletions
|
|
@ -16,10 +16,10 @@ iface {{ iface.name }}
|
|||
ip6-forward off
|
||||
{% for ip in iface.ip_addresses %}
|
||||
address {{ ip.address }}
|
||||
{% set subnet = ip.address | ipaddr('subnet') %}
|
||||
{% set subnet = ip.address | ansible.utils.ipaddr('subnet') %}
|
||||
{% set prefix = prefixes | selectattr('prefix', '==', subnet) | first %}
|
||||
{% if prefix.custom_fields.gateway %}
|
||||
gateway {{ prefix.custom_fields.gateway.address | ipaddr('address') }}
|
||||
gateway {{ prefix.custom_fields.gateway.address | ansible.utils.ipaddr('address') }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ iface lo inet loopback
|
|||
address {{ address }}
|
||||
{% endfor %}
|
||||
{% if peer is defined %}
|
||||
{% if loopback | ipv4 %}
|
||||
vxlan-local-tunnelip {{ loopback | ipv4 | first | ipaddr('address') }}
|
||||
{% if loopback | ansible.utils.ipv4 %}
|
||||
vxlan-local-tunnelip {{ loopback | ansible.utils.ipv4 | first | ansible.utils.ipaddr('address') }}
|
||||
{% endif %}
|
||||
{% if anycast | ipv4 %}
|
||||
clagd-vxlan-anycast-ip {{ anycast | first | ipaddr('address') }}
|
||||
{% if anycast | ansible.utils.ipv4 %}
|
||||
clagd-vxlan-anycast-ip {{ anycast | first | ansible.utils.ipaddr('address') }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
| selectattr('name', '==', 'lo')
|
||||
| map(attribute='ip_addresses') | first
|
||||
| selectattr('role') | selectattr('role.value', '==', 'loopback')
|
||||
| map(attribute='address') | ipv4 | first | ipaddr('address') %}
|
||||
| map(attribute='address') | ansible.utils.ipv4 | first | ansible.utils.ipaddr('address') %}
|
||||
{% set anycast_ip = interfaces
|
||||
| selectattr('name', '==', 'lo')
|
||||
| map(attribute='ip_addresses') | first
|
||||
| selectattr('role') | selectattr('role.value', '==', 'anycast')
|
||||
| map(attribute='address') | ipv4 | first | ipaddr('address') -%}
|
||||
| map(attribute='address') | ansible.utils.ipv4 | first | ansible.utils.ipaddr('address') -%}
|
||||
|
||||
# Peer link to the other switch.
|
||||
auto peerlink.4094
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue