ansible-lint only checks the tasks/handlers and doesn't iterate over the variables (e.g. if you're using with_items
, it won't iterate over all the items) and yamllint only checks cosmetic issues and is hard to customized with custom rules.
Is there a tool that can validate the actual data in the variables in YAML files before they are fed into Ansible?
Examples:
- A given variable cannot contain a specific string
- Variable
user_ssh_key
fed toauthorized_keys
cannot have a comment - Variable
ssh_enabled
fed toservice
module cannot be True - and so on...