salt.runners.match

Run matchers from the master context.

New in version 3007.0.

salt.runners.match.compound_matches(expr, minion_id)

Check whether a minion is matched by a given compound match expression. On success, this function will return the minion ID, otherwise False.

Note

Pillar values will be matched literally only since this function is intended for remote calling. This also applies to node groups defined on the master. Custom matchers are not respected.

Note

If a module calls this runner from a minion, you will need to explicitly allow the remote call. See peer_run.

CLI Example:

salt-run match.compound_matches 'I@foo:bar and G@os:Deb* and not db*' myminion
expr

The Compound Matcher expression to validate against.

minion_id

The minion ID of the minion to check the match for.