From 76283bd29975e27c9f7f9125ffcff4fc4f4a767b Mon Sep 17 00:00:00 2001 From: notok Date: Tue, 30 Nov 2021 01:52:40 +0900 Subject: [PATCH] Load ansible.cfg from the branch specified on job template Load ansible.cfg from the branch specified on job template (i.e. the same branch that the playbook exists), not from the branch set in the "project". Signed-off-by: notok --- awx/main/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index d3ce8f155f..c46db34c4f 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -1708,7 +1708,7 @@ class RunJob(BaseTask): ('ANSIBLE_ROLES_PATH', 'roles_path', 'requirements_roles', '~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles'), ) - config_values = read_ansible_config(job.project.get_project_path(), list(map(lambda x: x[1], path_vars))) + config_values = read_ansible_config(os.path.join(private_data_dir, 'project'), list(map(lambda x: x[1], path_vars))) for env_key, config_setting, folder, default in path_vars: paths = default.split(':')