-
Notifications
You must be signed in to change notification settings - Fork 112
fix: Skip the loopback profile when deleting all profiles except the ones explicitly included #813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR updates the 'absent' action in the network_connections module to exclude the loopback interface ('lo') from deletion, preventing a spurious 'changed' state each run when the system auto-recreates it. Flow diagram for updated profile deletion logic (excluding loopback)flowchart TD
A["Start profile deletion (absent action)"] --> B["Get non-absent profile names"]
B --> C["Add 'lo' (loopback) to blacklist"]
C --> D["Iterate over all network profiles"]
D --> E["If profile is in blacklist, skip deletion"]
D --> F["If profile is not in blacklist, delete profile"]
E --> G["End"]
F --> G["End"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #813 +/- ##
==========================================
+ Coverage 43.11% 43.22% +0.10%
==========================================
Files 12 12
Lines 3124 3123 -1
==========================================
+ Hits 1347 1350 +3
+ Misses 1777 1773 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…cept explicitly included - address linux-system-roles#689 Signed-off-by: Emilio Palumbo <emiliopalumbo@gmail.com>
|
[citest] |
Enhancement: This PR adds the
loopbackdevice toblack_list_nameswhen deleting all profiles except the ones explicitly included in the ansible playbookReason: Adding an entry without a name and
persistent_state: absentto thenetwork_connectionsvariables would trigger achangedstate in one of the tasksThis was because the profile
loopbackdevice was being removed and then automatically recreated by the system.Result: Now the loopback profile is kept and the state is not reported as
changed:Issue Tracker Tickets (GitHub issue): #689
Summary by Sourcery
Keep the loopback network profile from being deleted when purging absent profiles to prevent false-positive changes in Ansible playbooks
Bug Fixes:
Enhancements: