I have my Ansible.cfg file in /etc/ansible/ as well as /apps/ansible/ We have made all the required setup in /apps/ansible/. Now, I have created new user and have all the ssh keys setup for the client nodes. But, when I switch to the user and execute "ansible --verion", its getting the configuration from /etc/ansible/. How to do I point the my configuraion should be picked up from /apps/ansible ?
[ansible@Server ~]$ ansible --version ansible 220.127.116.11 config file = /etc/ansible/ansible.cfg configured module search path = [u'/home/ansible/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /bin/ansible python version = 2.7.5 (default, May 31 2018, 09:41:32) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] [ansible@Server ~]$