-
Notifications
You must be signed in to change notification settings - Fork 666
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
Aliases unsupported in schema[role-arg-spec] #3656
Comments
@tima @cidrblock As core team keeps making changes to argument_spec, the JSON Schema for validating argument_spec from within linter is always getting out of sync. Can we please have a talk and look into transitioning this to the same team that develops the argument_spec or at least find some way to prevent surprises via CI testing on core side? Otherwise we will always be behind when it comes to the schema, having a sub-par implementation of the supported features. There are multiple ways we can achieve this, some of them could even be very easy to implement. For example, adding running ansible-lint on on argspec fixtures used by core (good or bad) would basically ensure that no new feature is added that is not first included into the JSON Spec. Also validating a JSON file with a schema can be done in 4-5 lines of python, so even moving the entire schema to core would not be hard, especially as this would not require any user facing changes (only affect the core internal testing). |
This comment was marked as outdated.
This comment was marked as outdated.
@nicolasbouchard-ubi Please check ansible/ansible#79657 which is an open PR that is expected to make core warn about unknown fields. Aliases are not supported for role arg-spec, they are only supported for module arg-spec like LOTS of other fields. Basically the linter does the right thing here. I am not sure how we can improve the experience because too often people that google for argspec endup finding the page about modules instead of roles. |
let me see what I can do.... no promises :) |
Summary
When running ansible-lint against my scripts, I get this error: schema[role-arg-spec]: Additional properties are not allowed ('aliases' was unexpected)
But, running the validations passes in the playbook so surely the aliases has been taken into account because the argument is not named namespace.
Issue Type
OS / ENVIRONMENT
STEPS TO REPRODUCE
Create a role with the following files:
Desired Behavior
The alisases is accepted as a valid attribute by ansible-lint.
Actual Behavior
schema[role-arg-spec]): Additional properties are not allowed ('aliases' was unexpected)
The text was updated successfully, but these errors were encountered: