saltstack/salt — pull request #11965 by terminalmage (2014-04-13 22:35:24+00:00)
Title: Allow minion_id to be specified for certain match functions

This commit allows the minion ID to be specified for the functions in
salt/modules/match.py which operate on the minion ID (compound, list,
pcre, glob). Before, they would just use the value of __opts__['id'],
which makes these functions fail to work properly when run from within
Pillar SLS files, due to Pillar evaluation taking place on the master
(and thus __opts__ referring to the master opts instead of the minion
opts).

By adding a minion_id argument to these functions, the ID can be
overridden, and thus be specified using the 'id' grain in Pillar SLS
files.