Commit 7a94d566 by Brian Coca

tried to ensure input is always a list but will now be a noop for non

listable items
parent 3534bdf9
......@@ -236,7 +236,10 @@ def rand(environment, end, start=None, step=None):
raise errors.AnsibleFilterError('random can only be used on sequences and integers')
def randomize_list(mylist):
shuffle(mylist)
try:
shuffle(list(mylist))
except:
pass
return mylist
class FilterModule(object):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment