ansible-lint icon indicating copy to clipboard operation
ansible-lint copied to clipboard

Confict between `inline-env-var` and `command-instead-of-shell`

Open ioah86 opened this issue 9 months ago • 2 comments

Summary

It appears that the remediation to one issue is causing the rise of a different one. For the Rule inline-env-var in the current version, the recommended correction is using ansible.builtin.shell instead of ansible.builtin.command. But the rule command-instead-of-shell requires to use command. Hence, the recommendations should not use ansible.builtin.shell for the correct code or at least include an example using purely ansible.builtin.command.

Issue Type
  • Bug Report
OS / ENVIRONMENT

N/A

STEPS TO REPRODUCE

Read the documentation for inline-env-var and then also read the documentation for command-instead-of-shell. The "fixes" for inline-env-var violate command-instead-of-shell.

Desired Behavior

The recommended and documented fix for one issue should not violate another issue.

Actual Behavior

The recommended and documented fix for one issue should violates another issue.

ioah86 avatar Jan 05 '25 23:01 ioah86