Skip to content
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

test: fix some Ansible warnings not caught by lint #704

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

richm
Copy link
Contributor

@richm richm commented Jul 24, 2024

Do not use templating in when:, that:, until:. These
are evaluated as Jinja statements. In cases where the string
used is long or awkward to generate in-line, use an
intermediate var for the value.

Use a unique loop var instead of item in cases where a loop
may be called in a nested context.

Fix some formatting.

Signed-off-by: Rich Megginson rmeggins@redhat.com

Copy link

codecov bot commented Jul 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.22%. Comparing base (34d1f2d) to head (464fa35).
Report is 16 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #704       +/-   ##
===========================================
+ Coverage   20.50%   43.22%   +22.72%     
===========================================
  Files          10       12        +2     
  Lines        1478     3100     +1622     
  Branches      433        0      -433     
===========================================
+ Hits          303     1340     +1037     
- Misses       1174     1760      +586     
+ Partials        1        0        -1     
Flag Coverage Δ
sanity ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@richm
Copy link
Contributor Author

richm commented Jul 24, 2024

[citest]

1 similar comment
@richm
Copy link
Contributor Author

richm commented Jul 24, 2024

[citest]

spetrosi
spetrosi previously approved these changes Jul 24, 2024
Do not use templating in `when:`, `that:`, `until:`.  These
are evaluated as Jinja statements.  In cases where the string
used is long or awkward to generate in-line, use an
intermediate var for the value.

Use a unique loop var instead of `item` in cases where a loop
may be called in a nested context.

Fix some formatting.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
@richm
Copy link
Contributor Author

richm commented Jul 24, 2024

[citest]

@richm richm merged commit b7c6a25 into linux-system-roles:main Jul 25, 2024
29 of 33 checks passed
@richm richm deleted the fix-templating-warnings branch July 25, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants