how to run an Ansible command for specific number of hosts
Use the --limit option to select a subset of hosts:

ansible-playbook -i /path  test.yml --tags automation --limit host2


Its description from ansible-playbook documentation:


  further limit selected hosts to an additional pattern