Skip to content

Commit

Permalink
Use network_connectivity_network_cidr in network_connectivity (#167)
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Berendt <[email protected]>
  • Loading branch information
berendt authored Aug 1, 2024
1 parent bbc4e81 commit e5a44ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions roles/network_connectivity/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
ip_version: >-
{{
'ipv4'
if network_cidr | ansible.utils.ipv4 | length > 0
if network_connectivity_network_cidr | ansible.utils.ipv4 | length > 0
else (
'ipv6'
if network_cidr | ansible.utils.ipv6 | length > 0
if network_connectivity_network_cidr | ansible.utils.ipv6 | length > 0
else
None
)
Expand All @@ -47,7 +47,7 @@
| map(attribute=ip_version)
| selectattr('address', 'defined')
| map(attribute='address')
| ansible.utils.ipaddr(network_cidr)
| ansible.utils.ipaddr(network_connectivity_network_cidr)
| list
| first
}}
Expand Down Expand Up @@ -87,7 +87,7 @@
| map('map', attribute=ip_version)
| map('selectattr', 'address', 'defined')
| map('map', attribute='address')
| map('ansible.utils.ipaddr', network_cidr)
| map('ansible.utils.ipaddr', network_connectivity_network_cidr)
| list
| flatten
}}
Expand Down

0 comments on commit e5a44ec

Please sign in to comment.