-
Notifications
You must be signed in to change notification settings - Fork 8
fix: Avoid setting ansible_managed variable #61
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
Cause: The test used a temporary variable `ansible_managed`, but that is a "magic" string constant. Ansible 2.19 does not permit assigning to it any more. Consequence: Tests failed with Ansible 2.19. Fix: Rename the variable.
Reviewer's GuideTests have been updated to avoid assigning to the magic ansible_managed variable by renaming it to __ansible_managed in both presence and absence assertion tasks, ensuring compatibility with Ansible 2.19. 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.
Hey @martinpitt - I've reviewed your changes and they look great!
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #61 +/- ##
=======================================
Coverage ? 52.31%
=======================================
Files ? 1
Lines ? 346
Branches ? 0
=======================================
Hits ? 181
Misses ? 165
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
[citest] |
|
remaining failure reproduces locally: Error is:
This is due to ansible/ansible#85202 . I fixed that, but it now still fails later on an inscrutable syntax error during validation. That smells similar to linux-system-roles/ssh#189 |
Cause: The test used a temporary variable
ansible_managed, but that is a "magic" string constant. Ansible 2.19 does not permit assigning to it any more.Consequence: Tests failed with Ansible 2.19.
Fix: Rename the variable.
This should fix the F42/Ansible 2.19 failure introduced in #60
Summary by Sourcery
Prevent tests from assigning to the reserved ansible_managed variable to restore compatibility with Ansible 2.19
Bug Fixes:
Tests: