-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
regression: host_vars in inventory_dir not considered #16117
Comments
@benjixx when I re-run the reproducer I had in #12742, I see the correct output:
Can you share exactly how your test reproduces the problem you're seeing? |
@jimi-c I just tried with your reproducer from #12742 in the same way you did, and it seems: you're right. This works. But there are strange things going on here. By just slightly changing your example the problem appears again:
Do you have any clue what's happening here? |
This did bisect down to 273a965, so I'll look into why. |
So it looks like this is because I stopped it from saving the host_vars locally in the hosts |
I believe I have this fixed, however I want to add some unit tests to make sure we don't run into this again. |
Also fixes a bug where add_host was not adding the vars files Fixes #16117
Due to the nature of this bug and the structure of the unit tests, I've been unable to exactly recreate the way this bug occurs, so for now I've just merged in the above patch to fix this. Unfortunately the inventory code is overdue for some cleanups and refactoring (it's the only major chunk of code that wasn't changed much in 2.0+), and as such doesn't have very good unit tests. We'll be addressing that in the future. If you continue seeing any problems related to this issue, or if you have any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:
Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular issue is resolved. Thank you! |
is #16128 related? |
Yep, and should now be fixed too. |
Latest |
@benjixx excellent, thanks for the follow up! |
Also fixes a bug where add_host was not adding the vars files Fixes #16117
ISSUE TYPE
Bug Report
ANSIBLE VERSION
ansible@devel (commit 273a965 specifically)
CONFIGURATION
N/A
OS / ENVIRONMENT
MacOS 10.11.5
SUMMARY
The issue I reported in #12742 (which had been fixed) popped up again this morning. Turns out that the responsible commit is 273a965.
I discovered this as one of my nightly builds that runs against ansible@devel failed: https://travis-ci.org/goodplay/goodplay/jobs/134945180
STEPS TO REPRODUCE
see #12742
EXPECTED RESULTS
see #12742
ACTUAL RESULTS
see #12742
The text was updated successfully, but these errors were encountered: