ansible-role-yedit icon indicating copy to clipboard operation
ansible-role-yedit copied to clipboard

Set 'value' type to noop validator

Open benjamb opened this issue 2 years ago • 0 comments

If the type of an argument is not set, ansible defaults to treating it as a string. As such it gets run through a validator that converts the value to a string via str().

In the case of 'value' being null, or perhaps a dict or list that contained null, the conversion via str() would cause the python native None to be passed to this module, which when parsed through yaml.safe_load() in parse_value(), would return the string 'None'.

To fix this, we set the type of 'value' to a noop validator, as the type may vary and we don't want ansible to perform any conversion.

benjamb avatar May 25 '22 14:05 benjamb