feat: add initial support for sle16+#863
Merged
richm merged 1 commit intolinux-system-roles:mainfrom Apr 29, 2026
Merged
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds initial SLE16+ support to the network role by adjusting default package names for gobject/NetworkManager dependencies and extending the teaming configuration abort logic to cover newer SUSE releases. Flow diagram for teaming configuration abort logic on EL10+ and SLE16+flowchart TD
A_start["Start task: Abort applying teaming configuration"] --> B_checkTeams["Check if any team-type connections are defined in network_connections or network_state.interfaces"]
B_checkTeams -->|No team connections| Z_skip["Skip abort task (no team configurations)"]
B_checkTeams -->|Team connections present| C_checkRHEL["Is distribution in __network_rh_distros AND distribution_major_version > 9?"]
C_checkRHEL -->|Yes| Y_abort["Fail task: Teaming is not supported on EL10+; use bonding instead"]
C_checkRHEL -->|No| D_checkSUSE["Is os_family Suse AND distribution_major_version >= 16?"]
D_checkSUSE -->|Yes| Y_abort
D_checkSUSE -->|No| Z_skip
Z_skip --> E_end["End task (no failure)"]
Y_abort --> E_end
Flow diagram for default gobject and NetworkManager package resolution with SLE16+ supportflowchart TD
A_start["Start package defaults evaluation"] --> B_detectPythonMajor["Read ansible_facts.python.version.major"]
B_detectPythonMajor --> C_detectOSFamily["Read ansible_facts.os_family"]
C_detectOSFamily --> D_isSuse["Is os_family Suse?"]
D_isSuse -->|Yes| E_pkgNameSuse["Set __network_packages_default_gobject_packages to python<major>-gobject"]
D_isSuse -->|No| F_pkgNameBase["Set __network_packages_default_gobject_packages to python<major>-gobject-base"]
E_pkgNameSuse --> G_buildNMList["Build __network_packages_default_nm"]
F_pkgNameBase --> G_buildNMList
G_buildNMList --> H_addBasePackages["Add NetworkManager and gobject packages"]
H_addBasePackages --> I_addWpaWirelessTeam["Add wpa_supplicant, wireless, and team packages"]
I_addWpaWirelessTeam --> J_isSuseForTypelib["Is os_family Suse?"]
J_isSuseForTypelib -->|Yes| K_addTypelib["Add typelib-1_0-NM-1_0 to __network_packages_default_nm"]
J_isSuseForTypelib -->|No| L_skipTypelib["Do not add typelib-1_0-NM-1_0"]
K_addTypelib --> M_end["Final __network_packages_default_nm list computed"]
L_skipTypelib --> M_end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The
ansible_facts['os_family'] == 'Suse'check intasks/main.ymldoes not use the same| d('')default pattern as indefaults/main.yml, which can cause undefined fact failures on some hosts; consider normalizing these checks with a helper var or consistent defaulting. - The inline Jinja logic for computing the gobject package name and conditionally adding
typelib-1_0-NM-1_0is getting a bit dense; consider moving the SUSE-specific package selection into separate vars (e.g.__network_packages_suse_nm_extras) to simplify the expressions and make the SUSE behavior easier to adjust later.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `ansible_facts['os_family'] == 'Suse'` check in `tasks/main.yml` does not use the same `| d('')` default pattern as in `defaults/main.yml`, which can cause undefined fact failures on some hosts; consider normalizing these checks with a helper var or consistent defaulting.
- The inline Jinja logic for computing the gobject package name and conditionally adding `typelib-1_0-NM-1_0` is getting a bit dense; consider moving the SUSE-specific package selection into separate vars (e.g. `__network_packages_suse_nm_extras`) to simplify the expressions and make the SUSE behavior easier to adjust later.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Signed-off-by: HVSharma12 <harshvardhan.sharma@suse.com>
aa4b8db to
a22a52a
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #863 +/- ##
==========================================
- Coverage 43.11% 42.71% -0.41%
==========================================
Files 12 13 +1
Lines 3124 3158 +34
==========================================
+ Hits 1347 1349 +2
- Misses 1777 1809 +32 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
[citest] |
Contributor
|
The errors are not related to the PR |
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: add initial support for the network role for sle16+
Reason: The role currently fails at package install on SUSE python3-gobject-base does not exist (SUSE ships python3-goject) and typelib-1_0-NM-1_0 ships separately, not as a NetworkManager dep.
Result: update defaults/main to add typelib-1_0-NM-1_0 and manage the -base suffix for SLES.
Issue Tracker Tickets (Jira or BZ if any): na
Summary by Sourcery
Add initial SLES 16+ support to the network role by adjusting package defaults and teaming support guards.
New Features:
Bug Fixes:
Enhancements: