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 <noto.kazufumi@gmail.com>
This commit is contained in:
notok 2021-11-30 01:52:40 +09:00
parent 5512b71e16
commit 76283bd299

View File

@ -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(':')