1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Also convert ints to bool for type=bool

This commit is contained in:
Monty Taylor 2015-12-22 09:14:12 -06:00
parent f2364ecf5f
commit c60749c922

View file

@ -1274,7 +1274,7 @@ class AnsibleModule(object):
if isinstance(value, bool):
return value
if isinstance(value, basestring):
if isinstance(value, basestring) or isinstance(value, int):
return self.boolean(value)
raise TypeError('%s cannot be converted to a bool' % type(value))