Stabilization: Fix for sshd_lineinfile template to comply with newer ansible versions - #15055
Merged
Conversation
teacup-on-rockingchair
requested review from
Mab879
and
a lite review from Copilot
August 26, 2026 07:04
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Ansible package applicability/version-check macro to be compatible with newer Ansible versions that are stricter about type handling during version comparisons. This is intended to prevent remediation failures (notably in consumers like the sshd_lineinfile template) when package fact fields (e.g., epoch) are not consistently typed.
Changes:
- Adjust RPM
epochhandling inansible_pkg_conditionalto coerce theepochvalue to an integer before it is used to drive the conditional prefix construction. - Reduce the chance of type-related failures when evaluating the
is version(...)test in newer Ansible releases.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Mab879
approved these changes
Aug 26, 2026
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.
Description:
Rationale:
Backport #15022 to stabiliziation