-
Notifications
You must be signed in to change notification settings - Fork 664
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
Misleading errors for schema validation of meta file #2157
Comments
Make it a string, the |
Ah, thanks for the info. Didn't realize that you already reported that upstream (and what the upstream project was for this issue) |
I still experiencing this issue with ansible-lint 6.5.2 using ansible 2.13.2, jsonschema 4.15.0 And the workaround with making the integer a string. Doesn't work anymore. |
@anxstj If you look at the entire platform entry, you will find the missing combination of platform name and version. Please do not put random comments without clear information on closed bugs as they do not help anyone. |
Steps to reproduce my issue:
So, it seems that "CentOS" is not defined in ansible/schemas. I guess I need to patch |
That is because everyone use "EL" for it, which covers both RHEL and CentOS. Look at https://github.com/ansible/schemas/blob/main/f/ansible-meta.json#L298-L308 If you search on galaxy, you will not find one collection supporting "CentOS" but lots using "EL". It is bit confusing but I do not know how the schema can help in this area. Maybe we can update the description field to tell people to use "EL" if they want to use centos or rhel. |
Observing now same meta linting error with Debian platform spec.
Error:
Used version/OS:
@ssbarnea any comments? |
Summary
When having a meta yaml, the error message for validation was misleading in my case.
Issue Type
Ansible and Ansible Lint details
ansible-lint 6.3.0, installed via pip
STEPS TO REPRODUCE
Have a
meta
file like following in a role:Desired Behavior
Output is
Actual Behavior
Additional hints:
When looking at the schema file,
['6.1', '7.1', '7.2', 'all']
seems like the error was that the platform was detected to be an AIX. Obviously that is wrong and the error was that7
was not a string. The error also hinted that "7" wouldn't have been a valid choiceThe text was updated successfully, but these errors were encountered: