Skip to content

Fix inline-env-var false positive when expand_argument_vars is used #4587

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rob4226
Copy link

@rob4226 rob4226 commented Apr 18, 2025

When the expand_argument_vars parameter is used on the ansible.builtin.command module, ansible-lint generates a false positive with the inline-env-var rule. The expand_argument_vars parameter was added to the ansible.builtin.command module in ansible-core 2.16 and it appears the inline-env-var lint rule was not updated. This commit updates the inline-env-var rule to support the expand_argument_vars parameter.

A test was added that fails prior to this change and succeeds after the change.

When the expand_argument_vars parameter is used on the
ansible.builtin.command module, ansible-lint generates a false positive
with the inline-env-var rule. The expand_argument_vars parameter was
added to the ansible.builtin.command module in ansible-core 2.16 and it
appears the inline-env-var lint rule was not updated. This commit
updates the inline-env-var rule to support the expand_argument_vars
parameter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Review
Development

Successfully merging this pull request may close these issues.

2 participants