Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
🎨 Deduplicate to_bool() implementation #53066
bool parser in module_utils and bool converter in core filter plugin are loosely the same. So I've made filter plugin reuse the function from module_utils.
The implementations are not the same, so this is problematic IMO.
The old implementation considered everything lowercase that matches ('yes', 'on', '1', 'true', 1) as True, everything else is False.
The new implementation considers ('y', 'yes', 'on', '1', 'true', 't', 1, 1.0, True)) as True. So this may break stuff that expected the older behaviour.
On top of that, the old implementation would retain None values, while this does not.
I don't think we want to do this.
BTW I am not in favor of using Emojis/Unicode art in commit messages. If we start to do this we are distracting people from what matters IMO.
The index at https://github.com/ansible/ansible has been bothering me for some time with
the new implementation is 'more correct' , but @dagwieers is right , this will break existing plays.
A deprecation message should be in place explaining how the current and future implementations will work, probably with a toggle
CI failure in unit tests: https://app.shippable.com/github/ansible/ansible/runs/111001/5/tests
CI failure in integration tests: