You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During module parameters validation, if a value must be a list and a single string is provided, the value is turned into a list with that string as the only element, due to this code:
Role argument validation is just validation and cannot change the content of variables, This is unlikely to change since it would introduce even more complexity to the already complex variable model, so default is just for documentation and the existing type validators only guarantee that it can be converted to the type, not that it is actually that type. See #81575 for the planned addition of strict validators, which is evidently on hold until data tagging lands.
Summary
During module parameters validation, if a value must be a list and a single string is provided, the value is turned into a list with that string as the only element, due to this code:
ansible/lib/ansible/module_utils/common/validation.py
Lines 390 to 410 in 667526c
Although the validation passes, the function doesn't seem to be applied when validating a role.
Issue Type
Bug Report
Component Name
Role Argument Spec Validation
Ansible Version
Configuration
OS / Environment
Fedora 40
Steps to Reproduce
meta/argument_specs.py
tasks/main.yml
test_playbook.yml
Playbook run:
ansible-playbook test_playbook.yml
Expected Results
Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: