refactor: Use __ad_integration_rh_distros when checking distribution#160
Merged
richm merged 2 commits intolinux-system-roles:mainfrom Nov 14, 2025
Merged
refactor: Use __ad_integration_rh_distros when checking distribution#160richm merged 2 commits intolinux-system-roles:mainfrom
__ad_integration_rh_distros when checking distribution#160richm merged 2 commits intolinux-system-roles:mainfrom
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideReplaces hardcoded Red Hat clones list with the dynamic Class diagram for distribution check logic updateclassDiagram
class MainTask {
+ansible_distribution: string
+ansible_distribution_version: string
+ad_integration_manage_crypto_policies: bool
+ad_integration_allow_rc4_crypto: bool
+crypto_policies_policy: string
}
class __lsr_redhat_clones {
+["CentOS", "RedHat", "AlmaLinux", "RockyLinux", ...]
}
MainTask --> __lsr_redhat_clones: uses for distribution checks
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- Verify that __lsr_redhat_clones is defined in your role defaults and includes all intended distros (Alma, Rocky, etc.) before using it in the when statements.
- Consider using ansible_distribution_major_version for the version checks to simplify the when conditions and make them more readable.
- The two crypto‐policy when blocks share very similar logic—extracting the distribution check into a separate variable or combined conditional could reduce duplication and improve maintainability.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Verify that __lsr_redhat_clones is defined in your role defaults and includes all intended distros (Alma, Rocky, etc.) before using it in the when statements.
- Consider using ansible_distribution_major_version for the version checks to simplify the when conditions and make them more readable.
- The two crypto‐policy when blocks share very similar logic—extracting the distribution check into a separate variable or combined conditional could reduce duplication and improve maintainability.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Fixes linux-system-roles#39 Signed-off-by: Hayley Hughes <hayley@foxes.systems>
Contributor
Author
|
Apologies for the force push, I forgot to signoff the commit |
richm
requested changes
Nov 14, 2025
Contributor
richm
left a comment
There was a problem hiding this comment.
Use __ad_integration_rh_distros instead of __lsr_redhat_clones, or __ad_integration_rh_distros_fedora if this applies to Red Hat clones and Fedora
Signed-off-by: Hayley Hughes <hayley@foxes.systems>
Contributor
Author
|
Done 🙂 I assume this check can't be simplified using Lines 113 to 115 in bbc8ef7 |
__lsr_redhat_clones when checking distribution__ad_integration_rh_distros when checking distribution
Contributor
|
[citest] |
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.
Enhancement:
Use
__ad_integration_rh_distrosinstead of a fixed list when checking the distro release for determining the crypto policyReason:
Adds support for Alma and Rocky Linux
Fixes #39
Summary by Sourcery
Use a dynamic clone list to determine supported RHEL-based distributions when checking crypto policies to add support for Alma and Rocky Linux.
New Features:
Enhancements: