diff --git a/gso/utils/workflow_steps.py b/gso/utils/workflow_steps.py index 06b3e4ef9d876c51f6ffba1a0e3ce6aa2f65e96f..a67558c4fc3f73d2096c51e394b8f111fb1fa282 100644 --- a/gso/utils/workflow_steps.py +++ b/gso/utils/workflow_steps.py @@ -56,6 +56,9 @@ def _update_sdp_mesh( inventory = generate_inventory_for_active_routers( router_role=RouterRole.PE, router_vendor=Vendor.NOKIA, exclude_routers=[subscription["router"]["router_fqdn"]] ) + if len(inventory["all"]["hosts"].keys()) == 0: + return # Skip this Ansible interaction if the inventory is empty. + extra_vars = { "dry_run": dry_run, "subscription": subscription,