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
Ignore non-valid file extensions for include_vars dirs #35809
Conversation
Further discussion is planned for the next meeting. cc @bcoca |
We discussed at today's meeting but there was no maxamillion or bcoca. This seems like there's no downside (currently users with files in vars with unknown extensions will break. After this, the files will be ignored). We'd like input from @bcoca or @maxamillion as to what the cons might be otherwise we're inclined to say go ahead and merge. |
bcoca arrived during open floor and we talked this over. Decided that changing behaviour needs a toggle for backwards compat. We disagreed on whether the toggle could itself be part of a deprecation cycle to change the default behaviour (and potentially remove the failure as an option in the future). bcoca thinks that using a dir with filters should be done in jinja2 with a loop instead. I think that using these parameters as filters for which files to consider (which is what the documentation shows) is fine. The problem to me is that they're not filters, they're statements of files to error on. Implementing a toggle is enough to move this forward. |
fyi, jinja is not needed, that was one example, using the |
processing to ignore non-valid file extensions Fixes ansible#35745 Signed-off-by: Adam Miller <admiller@redhat.com>
2dcfbd6
to
9b7f911
Compare
sorry for the lag time on this, now with a new option to keep backwards compat |
The test
|
@abadger @nitzmahone ping - I was going to set the version of this to 2.7 and defer until then because 2.6 is a bugfix only and this is technically a feature but the sanity test is angry about that. Thoughts on how bets to handle this? |
@maxamillion There's no way to avoid the error prior to merging until devel is for 2.7. Once stable-2.6 is branched this will pass CI, assuming no new issues come up. |
rebuild_merge |
Oh bleh, nvm ... the branch hasn't happened yet. Tabling for now. |
processing to ignore non-valid file extensions Fixes ansible#35745 Signed-off-by: Adam Miller <admiller@redhat.com>
Signed-off-by: Adam Miller admiller@redhat.com
SUMMARY
Fixes #35745
Previously, if the dir contained any non-valid varfiles file extensions the module/task would error.
ISSUE TYPE
COMPONENT NAME
plugins/action/include_vars.py
ANSIBLE VERSION
ADDITIONAL INFORMATION
Using the playbook:
Before:
After: