The ansible documentation website has an very interesting BCP best current practice how to run playbooks. Ideally the target hosts o are grouped in the hosts file like displayed below;

[routers]
R1
R2
R3
..
R230
R231
Rn

[switches]
S1
S2
..
S503
S504
Sn

If the test network has a few hundred routers and switches, and you want run a ansible playbook on only 3 of these few hundred targets. It is possible to run this a playbook on specific target R1 - R3 by adding a option with that playbook --limit routers[1:n]

ansible-playbook playbook-name.yml --limit routers[1:3]

If that is successful ansible might run the next bunch of components:

ansible-playbook playbook-name.yml --limit routers[4:7]
ansible-playbook playbook-name.yml --limit switches[8:20]

So that might help out to roll-out changes to network devices gradually, not changing things on a whole bunch of network devices.