Sample code which works in lab:Steps:
1. Create Domain Cluster Profile
2. Create Switch Profiles
3. Get VLAN Policy and link to Switch Profiles
---
- hosts: localhost
connection: local
gather_facts: false
vars:
api_info: &api_info
...
Creating a Domain profile is a 3 step process from what I understand. As per your code, you are creating a Switch Profile and associating a policy in a single step, that may be causing this issue. Please use below approach and share if you are still ...