Allow type=list module arguments to accept integers and floats.

pull/6697/merge
Michael DeHaan 11 years ago
parent 7a6c60b437
commit a6b25e8657

@ -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…
Cancel
Save