linux-system-roles / network

An ansible role to configure networking
https://linux-system-roles.github.io/network/
BSD 3-Clause "New" or "Revised" License
233 stars 106 forks source link

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

Closed richm closed 2 months ago

richm commented 2 months ago

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

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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](https://app.codecov.io/gh/linux-system-roles/network/pull/704/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linux-system-roles) | Coverage Δ | | |---|---|---| | [sanity](https://app.codecov.io/gh/linux-system-roles/network/pull/704/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linux-system-roles) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linux-system-roles#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

richm commented 2 months ago

[citest]

richm commented 2 months ago

[citest]

richm commented 2 months ago

[citest]