diff --git a/plugins/modules/aci_domain_to_vlan_pool.py b/plugins/modules/aci_domain_to_vlan_pool.py index 58b814bbd..88d4a74c1 100644 --- a/plugins/modules/aci_domain_to_vlan_pool.py +++ b/plugins/modules/aci_domain_to_vlan_pool.py @@ -333,8 +333,8 @@ def main(): subclass_1=dict( aci_class="infraRsVlanNs", aci_rn="rsvlanNs", - module_object="rsvlanNs", - target_filter={"name": domain}, + module_object=aci_mo if pool_name else None, + target_filter={"tDn": aci_mo} if pool_name else {}, ), )