Ansible Configuration File
As a default, Ansible expects to find files in a certain place. Some of these files may not suit your needs. To configure ansible to better suit your needs, use the ansible configuration file.
There are at least 2 ways to do this.
You can create a global configuration file by creating it in your home folder like this:
[defaults] inventory = ~/Path/To/ansible/hosts
Or, you can add an Ansible Configuration File to the root of your projects. That way you may have, for example, a hosts file relative to the root of a project.
[defaults] inventory = hosts