ansible playbook executing the tasks on localhost(Master Node) instead of remote node

this is my dynamic inventory

inventory of servers

#ungrouped servers
hdi_master1 ansible_host=13.234.186.61 ansible_user=centos --private-key=/home/centos/openshift.pem

#hdinsights groups
[hdinsights_all]
hdi_master1

My Playbook:

It’s because you have transport=local in your ansible.cfg. Remove that and it will default to ssh.