Can we put /etc/ansible/hosts file in other place?

Can we put /etc/ansible/hosts file in other place?

such as /home/tomy/ansible/hosts

?

I would not like to run ansible on my pc with root access.

You can place your inventory file(s) anywhere you like. Reference them from ansible.cfg, or using -i /path/to/inventory

As stated by Tom, you can use -i but you can also change your
~/.ansible.cfg :

    [defaults]

    # location of inventory file, eliminates need to specify -i
    hostfile = /home/tomy/ansible/hosts

Note that you can put a .ansible.cfg file in your "projects" directory,
so you can ahave a "per-project" specific inventory.

M