fix(_common): replace deprecated vars dictionary access - #869
Conversation
7981dc0 to
ec31793
Compare
|
Looks like a new set of integration tests ran and I have some failures--investigating. Edit: Hmm, I'm not sure if my PR is causing this failure or not: |
|
I had Codex help me debug the CI failures a bit, and it seems unrelated to my PRs, but in case this helps track it down:
I don't know enough about molecule nor the rest of your CI system to really propose a fix for the CI failures to be honest. |
|
It seems like one of the config items in our molecule config ( |
|
#871 should fix the tests. |
Signed-off-by: Will Buckner <1458615+willbuckner@users.noreply.github.com>
ec31793 to
114d992
Compare
|
@SuperQ CI passed this time after your change, thanks for doing that! This should be good to merge whenever. |
Docs Build 📝Thank you for contributing!✨ This PR has been merged and the docs are now incorporated into |
Summary
Replace direct membership checks against Ansible's internal
varsdictionary withansible.builtin.varnameslookup.Update all three deprecated variable assertions in the
_commonrole.Preserve detection when deprecated variables are assigned empty values.
Motivation
ansible-core 2.21 deprecated direct access to its internal
varsdictionary, for removal in ansible-core 2.24. Currently I'm seeing these deprecation warnings while doing ansible deployments.This is an alternative to #793 which is stale since April and failing some CI tests.
Using
varnamesavoids an undefined variable error when a variable is absent, and checks variable presence independently of its value.Fixes #853
Validation
ansible-lintandyamllintpassed with zero failures or warnings.git diff --checkpassed.