fixed precedence on ansible.cfg - #6038
Conversation
|
Build succeeded.
|
|
Based on the description of the issue and what you're doing here, this seems like it's probably what we want. But I want to get proper testing for it. I hope I can get around to that myself this afternoon tomorrow, unless someone else can first. |
| 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')) |
There was a problem hiding this comment.
Would we just want fnames.append ?
There was a problem hiding this comment.
I wasn't sure if it was done this way for another reason so I fixed it with as little changing as possible.
There was a problem hiding this comment.
Yea, I'm just saying that based on what you're doing here, names.append(os.path.join(project_path, 'ansible.cfg')) is more succinct and accomplishes the same thing.
|
Build succeeded.
|
|
Sorry, still trying to get the testing straight. |
|
This time I'm actually getting around to testing. |
AlanCoding
left a comment
There was a problem hiding this comment.
Found this quite hard to test, but eventually got it. The content for testing is at ansible/test-playbooks#124
make a JT that runs the debug playbook. Find that fails in devel, with role not found. Then use this branch, and find that it is successful.
|
This is about the millionth time I've said this, but hold off for a bit, still waiting for final test results. |
|
Okay, now I'm good with merging this. |
kdelee
left a comment
There was a problem hiding this comment.
Alan's tests passed w/ this branch -- I say ship it
|
Build succeeded (gate pipeline).
|
SUMMARY
Fix to correctly use project directory before /etc/ansible/ansible.cfg in instances where a setting exists in both.
ISSUE TYPE
COMPONENT NAME
AWX VERSION
ADDITIONAL INFORMATION