From e5a44ec52430f4c457a4937eaeb5e487e5cfdf12 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Thu, 1 Aug 2024 21:35:32 +0200 Subject: [PATCH] Use network_connectivity_network_cidr in network_connectivity (#167) Signed-off-by: Christian Berendt --- roles/network_connectivity/tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/network_connectivity/tasks/main.yml b/roles/network_connectivity/tasks/main.yml index bd497cd..cfcbbe7 100644 --- a/roles/network_connectivity/tasks/main.yml +++ b/roles/network_connectivity/tasks/main.yml @@ -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 ) @@ -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 }} @@ -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 }}