You've already forked ansible-netbox-inventory
test: ipv6 end-to-end scenarios
vm01 gains a primary IPv6 next to its IPv4, one standalone IPv6 address joins the dataset; covers ip_version on both sources, combination with filters, the IPv6-preferring behaviour of netbox's combined primary IP, and the invalid value error path.
This commit is contained in:
@@ -59,6 +59,7 @@ def run_inventory(stack):
|
||||
source: str = "",
|
||||
filter_name: str = "",
|
||||
filter_value: str = "",
|
||||
ip_version: str = "",
|
||||
args: tuple[str, ...] = ("--list",),
|
||||
token: str | None = None,
|
||||
):
|
||||
@@ -71,6 +72,7 @@ def run_inventory(stack):
|
||||
"NETBOX_INVENTORY_SOURCE": source or "ip-addresses",
|
||||
"NETBOX_INVENTORY_FILTER": filter_name,
|
||||
"NETBOX_INVENTORY_FILTER_VALUE": filter_value,
|
||||
"NETBOX_INVENTORY_IP_VERSION": ip_version or "both",
|
||||
}
|
||||
result = subprocess.run(
|
||||
[SCRIPT, *args], capture_output=True, text=True, timeout=120, env=env
|
||||
|
||||
Reference in New Issue
Block a user