diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index 099b2bbd64a..5c78cdabdf0 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -1483,7 +1483,7 @@ class AnsibleModule(object): if isinstance(value, float): return value - if isinstance(value, (binary_type, text_type, int)): + if isinstance(value, (bytes, unicode, int)): return float(value) raise TypeError('%s cannot be converted to a float' % type(value))