-
Notifications
You must be signed in to change notification settings - Fork 54
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
deduplicate default values in ansible scripts #1675
Comments
I don't know how feasible this can be if the default values are optional in the config file. Maybe we would have to define a global ansible var file for all the defaults. |
This is typically taken care of by the schema validator library I just checked and it appears there is no way to get the "filled with defaults" version from I.e. we would need to change our |
but I don't see how the default value will be incorporated in the config file if it doesn't exists. |
config.yml + config.schema.json via => config.defaults.json with defaults populated (defaults = from JSON schema, see link above) via => config.defaults.yml Ansible would then read the config.defaults.yml instead of the config.yml But yeah, there is a small downside in that we currently don't run the schema validation every time we run ansible - only for the install.sh. So it would no longer be possible to just modify the config.yml and then run ansible afterwards. |
In what area(s)?
Describe the feature
We currently repeat the default value for a given config value in a number of places in the ansible scripts.
At the same time, you have the schema which also defines a default value.
In principle, "all one would need to do" (to be figured out how) is to pass the config.yml through the schema validator before it is passed on to ansible. Then one could remove all these
| default("...")
in the ansible scripts, reducing duplication.The text was updated successfully, but these errors were encountered: