diff --git a/lib/ansible/runner/filter_plugins/core.py b/lib/ansible/runner/filter_plugins/core.py index 71cfd267dc..7d4c57155a 100644 --- a/lib/ansible/runner/filter_plugins/core.py +++ b/lib/ansible/runner/filter_plugins/core.py @@ -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):