I'm facing a similar situation but with NX-OS switches. I am able to build the list via API, but i cannot perform any task calling the hosts in another yml. I am not able to solve the syntax problem, could you provide an example on how do you use the hosts lists on tasks?