The match module allows for match routines to be run and determine target specs
Return True if the minion ID matches the given compound target
Specify the minion ID to match against the target expression
New in version 2014.7.0.
CLI Example:
salt '*' match.compound 'L@cheese,foo and *'
Return True if the minion matches the given data target
CLI Example:
salt '*' match.data 'spam:eggs'
Return the first match in a dictionary of target patterns
New in version 2014.7.0.
CLI Example:
salt '*' match.filter_by '{foo*: Foo!, bar*: Bar!}' minion_id=bar03
Pillar Example:
{% set roles = salt['match.filter_by']({
'web*': ['app', 'caching'],
'db*': ['db'],
}) %}
Return True if the minion ID matches the given glob target
Specify the minion ID to match against the target expression
New in version 2014.7.0.
CLI Example:
salt '*' match.glob '*'
Return True if the minion matches the given grain target. The delimiter argument can be used to specify a different delimiter.
CLI Example:
salt '*' match.grain 'os:Ubuntu'
salt '*' match.grain 'ipv6|2001:db8::ff00:42:8329' delimiter='|'
Specify an alternate delimiter to use when traversing a nested dict
New in version 2014.7.0.
Specify an alternate delimiter to use when traversing a nested dict
New in version 0.16.4.
Deprecated since version 2014.7.0.
Return True if the minion matches the given grain_pcre target. The delimiter argument can be used to specify a different delimiter.
CLI Example:
salt '*' match.grain_pcre 'os:Fedo.*'
salt '*' match.grain_pcre 'ipv6|2001:.*' delimiter='|'
Specify an alternate delimiter to use when traversing a nested dict
New in version 2014.7.0.
Specify an alternate delimiter to use when traversing a nested dict
New in version 0.16.4.
Deprecated since version 2014.7.0.
Return True if the minion matches the given ipcidr target
CLI Example:
salt '*' match.ipcidr '192.168.44.0/24'
Return True if the minion ID matches the given list target
Specify the minion ID to match against the target expression
New in version 2014.7.0.
CLI Example:
salt '*' match.list 'server1,server2'
Return True if the minion ID matches the given pcre target
Specify the minion ID to match against the target expression
New in version 2014.7.0.
CLI Example:
salt '*' match.pcre '.*'
Return True if the minion matches the given pillar target. The delimiter argument can be used to specify a different delimiter.
CLI Example:
salt '*' match.pillar 'cheese:foo'
salt '*' match.pillar 'clone_url|https://github.com/saltstack/salt.git' delimiter='|'
Specify an alternate delimiter to use when traversing a nested dict
New in version 2014.7.0.
Specify an alternate delimiter to use when traversing a nested dict
New in version 0.16.4.
Deprecated since version 2014.7.0.
Docs for previous releases are available on salt.rtfd.org.
Latest Salt release: 2014.7.1
22.16.107. salt.modules.makeconf
Upcoming SaltStack events, webinars and local meet ups and user groups.