From 58c06d5aeab5943f7632d292e7ed31a8fdbcf393 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 23 Feb 2020 14:58:47 +0000 Subject: [PATCH 1/2] fixed precedence on ansible.cfg --- awx/main/utils/ansible.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/utils/ansible.py b/awx/main/utils/ansible.py index fa15c47ab1..91b117ae5d 100644 --- a/awx/main/utils/ansible.py +++ b/awx/main/utils/ansible.py @@ -106,7 +106,7 @@ def could_be_inventory(project_path, dir_path, filename): def read_ansible_config(project_path, variables_of_interest): fnames = ['/etc/ansible/ansible.cfg'] if project_path: - fnames.insert(0, os.path.join(project_path, 'ansible.cfg')) + fnames.insert(1, os.path.join(project_path, 'ansible.cfg')) values = {} try: parser = ConfigParser() From 350046d495c9e2d815993b04205af64d01df37f3 Mon Sep 17 00:00:00 2001 From: gamuniz Date: Wed, 26 Feb 2020 14:28:22 +0000 Subject: [PATCH 2/2] changed syntax as insert isn't required --- awx/main/utils/ansible.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/utils/ansible.py b/awx/main/utils/ansible.py index 91b117ae5d..18011504b9 100644 --- a/awx/main/utils/ansible.py +++ b/awx/main/utils/ansible.py @@ -106,7 +106,7 @@ def could_be_inventory(project_path, dir_path, filename): def read_ansible_config(project_path, variables_of_interest): fnames = ['/etc/ansible/ansible.cfg'] if project_path: - fnames.insert(1, os.path.join(project_path, 'ansible.cfg')) + fnames.append(os.path.join(project_path, 'ansible.cfg')) values = {} try: parser = ConfigParser()