Finish the match.filter_by example (#33281)

This commit is contained in:
Seth House 2016-05-16 14:12:07 -06:00 committed by Mike Place
parent 319a4d8288
commit 01ce818092

View File

@ -322,10 +322,14 @@ def filter_by(lookup, expr_form='compound', minion_id=None):
.. code-block:: yaml
# Filter the data for the current minion into a variable:
{% set roles = salt['match.filter_by']({
'web*': ['app', 'caching'],
'db*': ['db'],
}) %}
# Make the filtered data available to Pillar:
roles: {{ roles | yaml() }}
'''
expr_funcs = dict(inspect.getmembers(sys.modules[__name__],
predicate=inspect.isfunction))