From e4f4204c4dcb5d9d300a2e2cca9cabe4b7afcf94 Mon Sep 17 00:00:00 2001 From: Andrew Butcher Date: Wed, 31 Jan 2018 09:53:18 -0500 Subject: lib_utils_oo_collect: Allow filtering on dot separated keys. --- roles/lib_utils/filter_plugins/oo_filters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'roles/lib_utils') diff --git a/roles/lib_utils/filter_plugins/oo_filters.py b/roles/lib_utils/filter_plugins/oo_filters.py index 574743ff1..c355115b5 100644 --- a/roles/lib_utils/filter_plugins/oo_filters.py +++ b/roles/lib_utils/filter_plugins/oo_filters.py @@ -126,7 +126,7 @@ def lib_utils_oo_collect(data_list, attribute=None, filters=None): raise errors.AnsibleFilterError( "lib_utils_oo_collect expects filter to be a dict") retval.extend([get_attr(d, attribute) for d in data if ( - all([d.get(key, None) == filters[key] for key in filters]))]) + all([get_attr(d, key) == filters[key] for key in filters]))]) else: retval.extend([get_attr(d, attribute) for d in data]) -- cgit v1.2.3