ipaddr was moved to ansible.utils
This commit is contained in:
parent
8276c6e8b4
commit
32ddf5e58e
9 changed files with 16 additions and 16 deletions
|
|
@ -19,11 +19,11 @@ iface {{ iface.name }}{% if iface.name == 'lo' %} inet loopback{% endif +%}
|
|||
{% endif %}
|
||||
{% 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 %}
|
||||
{% set gateway = prefix.custom_fields.gateway.address %}
|
||||
{% if gateway is defined %}
|
||||
gateway {{ gateway | ipaddr('address') }}
|
||||
gateway {{ gateway | ansible.utils.ipaddr('address') }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,5 +11,5 @@ ff02::3 ip6-allhosts
|
|||
| map(attribute='interfaces') | flatten
|
||||
| map(attribute='ip_addresses') | flatten
|
||||
| selectattr('dns_name') %}
|
||||
{{ address.address | ipaddr('address') }} {{ address.dns_name }} {{ address.dns_name | split('.') | first }}
|
||||
{{ address.address | ansible.utils.ipaddr('address') }} {{ address.dns_name }} {{ address.dns_name | split('.') | first }}
|
||||
{% endfor %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue