fixed precedence on ansible.cfg

This commit is contained in:
root
2020-02-23 14:58:47 +00:00
parent 1d3bb97b07
commit 58c06d5aea

View File

@@ -106,7 +106,7 @@ def could_be_inventory(project_path, dir_path, filename):
def read_ansible_config(project_path, variables_of_interest): def read_ansible_config(project_path, variables_of_interest):
fnames = ['/etc/ansible/ansible.cfg'] fnames = ['/etc/ansible/ansible.cfg']
if project_path: if project_path:
fnames.insert(0, os.path.join(project_path, 'ansible.cfg')) fnames.insert(1, os.path.join(project_path, 'ansible.cfg'))
values = {} values = {}
try: try:
parser = ConfigParser() parser = ConfigParser()