'Load Config File order(first found is used): ENV, CWD, HOME, /etc/ansible'

def find_ini_config_file(self):

    path0 = os.getenv('ANSIBLE_CONFIG', None)
    if (path0 is not None):
        path0 = unfrackpath(path0, follow=False)
        if os.path.isdir(path0):
            path0 += '/ansible.cfg'
    try:
        path1 = (os.getcwd() + '/ansible.cfg')
    except OSError:
        path1 = None
    path2 = unfrackpath('~/.ansible.cfg', follow=False)
    path3 = '/etc/ansible/ansible.cfg'
    for path in [path0, path1, path2, path3]:
        if ((path is not None) and os.path.exists(path)):
            break
    else:
        path = None
    return path
