Merge pull request #13639 from emonty/bool-conversion
Also convert ints to bool for type=bool
This commit is contained in:
commit
474772c81c
1 changed files with 1 additions and 1 deletions
|
@ -1274,7 +1274,7 @@ class AnsibleModule(object):
|
||||||
if isinstance(value, bool):
|
if isinstance(value, bool):
|
||||||
return value
|
return value
|
||||||
|
|
||||||
if isinstance(value, basestring):
|
if isinstance(value, basestring) or isinstance(value, int):
|
||||||
return self.boolean(value)
|
return self.boolean(value)
|
||||||
|
|
||||||
raise TypeError('%s cannot be converted to a bool' % type(value))
|
raise TypeError('%s cannot be converted to a bool' % type(value))
|
||||||
|
|
Loading…
Reference in a new issue