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

display of used profile wrong #3998

Open
0xFaul opened this issue Jan 26, 2024 · 2 comments
Open

display of used profile wrong #3998

0xFaul opened this issue Jan 26, 2024 · 2 comments
Labels

Comments

@0xFaul
Copy link

0xFaul commented Jan 26, 2024

Summary

when running ansible-lint the used profile in the out put is wrong:

ansible-lint --profile production
[...]
Passed with min profile: [...]

whereas

ansible-lint --profile min
[...]
Passed with production profile: [...]
Issue Type
  • Bug Report
OS / ENVIRONMENT
ansible-lint --version
ansible-lint 6.13.1 using ansible 2.14.3
  • ansible installation method: OS package (debian bookworm)
  • ansible-lint installation method: OS package (debian bookworm)
STEPS TO REPRODUCE

run ansible-lint against any playbook with cli param ---profile production -> check output
run ansible-lint against any playbook with cli param ---profile min -> check output

Desired Behavior

show actual used profile
Possible security bugs should be reported via email to security@ansible.com

Actual Behavior

displayed profile is flipped min <-> production ...

@0xFaul 0xFaul added bug new Triage required labels Jan 26, 2024
@ssbarnea
Copy link
Member

@cidrblock Maybe we can check on this because it seems to keep confusing users. We report the top profile that passed and people assume that is the "required" one.

If your code passed production, it will always report "Passed with production profile" even if you asked for min, as min is included in production.

@0xFaul
Copy link
Author

0xFaul commented Feb 5, 2024

Not sure whether you got me right. I'm not talking about the Failed: 66 failure(s), 0 warning(s) on 95 files. Profile 'production' was required, but 'min' profile passed.

i'm talking about the

$ ansible-lint -c .ansible-lint --project-dir . --profile production
[...]
Read documentation for instructions on how to ignore specific rule violations.

                   Rule Violation Summary
 count tag               profile rule associated tags
     1 yaml[line-length] basic   formatting, yaml (warning)

Passed with min profile: 0 failure(s), 1 warning(s) on 94 files.

i explicitly pass the production profile and the output returns that it passed with min profile (and vice versa).

@audgirka audgirka self-assigned this Feb 7, 2024
@audgirka audgirka removed the new Triage required label Feb 7, 2024
@audgirka audgirka removed their assignment May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

3 participants