From 7a94d566e55e9cd8309260208403fd26ccde2ece Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 8 Oct 2014 10:54:14 -0400 Subject: [PATCH] tried to ensure input is always a list but will now be a noop for non listable items --- lib/ansible/runner/filter_plugins/core.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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):