Ansible-play reference a local hosts file

How do I get Ansible-play to reference a local hosts files? I created a hosts file in the same directly with my site.yaml file but it doesn’t seem to reference it. Is there a way to get it to use a local vs the /etc/Ansible/hosts?

I would like to have a local version and not need to update the master with a priv account.

Thanks in advance.

In the same directory as your site.yaml and host file, create a ansible.cfg file with the following content:

[defaults]
hostfile = <name of your hostfile>

Great thanks. I like that better than using the inventory argument.