-
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
Improve module argument handling #1880
Comments
Example of our Molecule schema: https://github.com/ansible/molecule/blob/master/molecule/model/schema_v2.py#L601. Example of what Ansible is doing: https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/cloud/docker/docker_container.py#L2859. It will be a never ending task trying to duplicate our schema validation here, looks like! |
Not really related as discuss on IRC but think it is complementary, please find an example here of how i see a docker molecule.yml who is:
Hope you will find some interesting ideas here. |
Won't have time to chase this. |
The current situation is that we are increasingly getting requests to add keys from our schema definition in the
molecule.yml
that correspond to the default Docker drivercreate.yml
. See #1879 and #1878 for more recent examples. This stands for all the driver plays that we maintain.The problem here is that we are duplicating the effort of what Ansible is doing. We are defining a schema using http://docs.python-cerberus.org/en/stable/ and validating what we get as input. Ansible already does this with the argspec validation. Our schema's can always be be behind in terms of what key/vals they offer ...
Following the idea from ansible/proposals#39 (comment), I would propose the idea for discussion: we somehow move to replace the Cerberus schema definitions with Ansible argspec validation (yet to be finished for external use, but fine to discuss for now).
This would allow us to:
Questions:
I'm writing this a bit fast and off the cuff but hopefully it's clear ...
The text was updated successfully, but these errors were encountered: