Limiting a Task execution on a subset of the host

Hi,
I have my /etc/ansible/hosts file as

[managementnodes]
192.168.56.103
192.168.56.104
192.168.56.101

I am calling the playbook as below

ansible-playbook testplaybook.yml --extra-vars=“target_host=managementnodes” --private-key=~/.ssh/id_rsa

My testplaybook.yml looks as below

when: inventory_hostname != play_hosts[0]

That was Awesome !!! It works , thank you so much !