Allow type=list module arguments to accept integers and floats.
This commit is contained in:
parent
7a6c60b437
commit
a6b25e8657
1 changed files with 2 additions and 0 deletions
|
@ -685,6 +685,8 @@ class AnsibleModule(object):
|
||||||
if not isinstance(value, list):
|
if not isinstance(value, list):
|
||||||
if isinstance(value, basestring):
|
if isinstance(value, basestring):
|
||||||
self.params[k] = value.split(",")
|
self.params[k] = value.split(",")
|
||||||
|
elif isinstance(value, int) or isinstance(value, float):
|
||||||
|
self.params[k] = [ str(value) ]
|
||||||
else:
|
else:
|
||||||
is_invalid = True
|
is_invalid = True
|
||||||
elif wanted == 'dict':
|
elif wanted == 'dict':
|
||||||
|
|
Loading…
Reference in a new issue