Fix inject facts as vars#1672
Merged
Merged
Conversation
Access gathered facts via the `ansible_facts` dictionary rather than the injected top-level `ansible_*` variables in roles we control: - mariadb: ansible_hostname, ansible_distribution_release - nginx: ansible_distribution_release - xdebug-tunnel: ansible_user_id, ansible_default_ipv4 `INJECT_FACTS_AS_VARS` defaulting to `True` is deprecated and will be removed in ansible-core 2.24, after which top-level facts are no longer auto-injected. Using `ansible_facts[...]` keeps these references working once that default flips (or when `inject_facts_as_vars = False` is set). Also bump roots.mailpit to v1.0.1, which makes the same migration for its `ansible_architecture` reference, so no actively-run role references a top-level fact var anymore. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1a984b7 to
9c3e7c8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1667
Access gathered facts via the
ansible_factsdictionary rather than the injected top-levelansible_*variables in roles we control:Also bump roots.mailpit to v1.0.1, which makes the same migration for its
ansible_architecturereference, so no actively-run role references a top-level fact var anymore.INJECT_FACTS_AS_VARScan't be changed yet due to one upstream issue. We are blocked by geerlingguy/ansible-role-ntp#149